Top Description Fields Constructors Methods
org.h2.value

public final Class ValueRow

extends ValueCollectionBase
Class Inheritance
Imports
org.h2.api.ErrorCode, org.h2.engine.CastDataProvider, .Constants, org.h2.message.DbException, org.h2.result.SimpleResult, java.util.LinkedHashMap, .Map, .Set

Row value.

Field Summary

Modifier and TypeField and Description
public static final ValueRow
EMPTY

Empty row.

private TypeInfo
Inherited from org.h2.value.ValueCollectionBase:
values

Constructor Summary

AccessConstructor and Description
private
ValueRow(TypeInfo type, Value[] list)

Method Summary

Modifier and TypeMethod and Description
public ValueRow
cloneWithOrder(int[]
array of indexes to create the new values array
newOrder
)

Creates a copy of this row but the new instance will contain the values according to newOrder.

public int
compareTypeSafe(Value
the other value
o
,
CompareMode
the compare mode
mode
,
CastDataProvider
the cast information provider
provider
)

Implements abstract org.h2.value.Value.compareTypeSafe.

Compare this value against another value given that the values are of the same data type.

private static <K, V> Map.Entry<K, V>[]
createEntriesArray(int length)

public boolean
equals(Object
the other value
other
)

Implements abstract org.h2.value.Value.equals.

Check if the two values have the same hash code.

public static ValueRow

Returns:

the value
get
(Value[]
the value array
list
)

Get or create a row value for the given value array.

public static ValueRow

Returns:

the value
get
(ExtTypeInfoRow
the extended data type information
extTypeInfo
,
Value[]
the value array
list
)

Get or create a typed row value for the given value array.

public static ValueRow

Returns:

the value
get
(TypeInfo
the data type information
typeInfo
,
Value[]
the value array
list
)

Get or create a typed row value for the given value array.

public SimpleResult
public StringBuilder
getSQL(StringBuilder
string builder
builder
,
int
formatting flags
sqlFlags
)

Implements org.h2.util.HasSQL.getSQL.

Appends the SQL statement of this object to the specified builder.

public String
getString()

Implements abstract org.h2.value.Value.getString.

Get the value as a string.

public TypeInfo
getType()

Implements abstract org.h2.value.Value.getType.

Implements org.h2.value.Typed.getType.

Returns the data type.

public int
getValueType()

Implements abstract org.h2.value.Value.getValueType.

Get the value type.

Inherited from org.h2.value.ValueCollectionBase:
compareWithNullcontainsNullgetListgetMemorygetValueWithFirstNullImplhashCode

Field Detail

EMPTYback to summary
public static final ValueRow EMPTY

Empty row.

typeback to summary
private TypeInfo type

Constructor Detail

ValueRowback to summary
private ValueRow(TypeInfo type, Value[] list)

Method Detail

cloneWithOrderback to summary
public ValueRow cloneWithOrder(int[] newOrder)

Creates a copy of this row but the new instance will contain the values according to newOrder.
E.g.: ROW('a', 'b').cloneWithOrder([1, 0]) returns ROW('b', 'a')

Parameters
newOrder:int[]

array of indexes to create the new values array

compareTypeSafeback to summary
public int compareTypeSafe(Value o, CompareMode mode, CastDataProvider provider)

Implements abstract org.h2.value.Value.compareTypeSafe.

Doc from org.h2.value.Value.compareTypeSafe.

Compare this value against another value given that the values are of the same data type.

Parameters
o:Value

the other value

mode:CompareMode

the compare mode

provider:CastDataProvider

the cast information provider

Returns:int

0 if both values are equal, -1 if the other value is smaller, and 1 otherwise

Annotations
@Override
createEntriesArrayback to summary
private static <K, V> Map.Entry<K, V>[] createEntriesArray(int length)
Annotations
@SuppressWarnings:unchecked
equalsback to summary
public boolean equals(Object other)

Implements abstract org.h2.value.Value.equals.

Doc from org.h2.value.Value.equals.

Check if the two values have the same hash code. No data conversion is made; this method returns false if the other object is not of the same class. For some values, compareTo may return 0 even if equals return false. Example: ValueDecimal 0.0 and 0.00.

Parameters
other:Object

the other value

Returns:boolean

true if they are equal

Annotations
@Override
getback to summary
public static ValueRow get(Value[] list)

Get or create a row value for the given value array. Do not clone the data.

Parameters
list:Value[]

the value array

Returns:ValueRow

the value

getback to summary
public static ValueRow get(ExtTypeInfoRow extTypeInfo, Value[] list)

Get or create a typed row value for the given value array. Do not clone the data.

Parameters
extTypeInfo:ExtTypeInfoRow

the extended data type information

list:Value[]

the value array

Returns:ValueRow

the value

getback to summary
public static ValueRow get(TypeInfo typeInfo, Value[] list)

Get or create a typed row value for the given value array. Do not clone the data.

Parameters
typeInfo:TypeInfo

the data type information

list:Value[]

the value array

Returns:ValueRow

the value

getResultback to summary
public SimpleResult getResult()
getSQLback to summary
public StringBuilder getSQL(StringBuilder builder, int sqlFlags)

Implements org.h2.util.HasSQL.getSQL.

Doc from org.h2.util.HasSQL.getSQL.

Appends the SQL statement of this object to the specified builder.

Parameters
builder:StringBuilder

string builder

sqlFlags:int

formatting flags

Returns:StringBuilder

the specified string builder

Annotations
@Override
getStringback to summary
public String getString()

Implements abstract org.h2.value.Value.getString.

Doc from org.h2.value.Value.getString.

Get the value as a string.

Returns:String

the string

Annotations
@Override
getTypeback to summary
public TypeInfo getType()

Implements abstract org.h2.value.Value.getType.

Implements org.h2.value.Typed.getType.

Doc from org.h2.value.Typed.getType.

Returns the data type.

Returns:TypeInfo

the data type

Annotations
@Override
getValueTypeback to summary
public int getValueType()

Implements abstract org.h2.value.Value.getValueType.

Doc from org.h2.value.Value.getValueType.

Get the value type.

Returns:int

the value type

Annotations
@Override