org.h2.value

## Class ValueResultSet

- java.lang.Object
- - org.h2.value.VersionedValue
  - - org.h2.value.Value
    - - org.h2.value.ValueResultSet

    public class ValueResultSet
    extends Value

Implementation of the RESULT_SET data type.

### Field Summary

### Fields inherited from class org.h2.value.Value

`ARRAY, BLOB, BOOLEAN, BYTE, BYTES, CLOB, DATE, DECIMAL, DOUBLE, ENUM, FLOAT, GEOMETRY, INT, INTERVAL_DAY, INTERVAL_DAY_TO_HOUR, INTERVAL_DAY_TO_MINUTE, INTERVAL_DAY_TO_SECOND, INTERVAL_HOUR, INTERVAL_HOUR_TO_MINUTE, INTERVAL_HOUR_TO_SECOND, INTERVAL_MINUTE, INTERVAL_MINUTE_TO_SECOND, INTERVAL_MONTH, INTERVAL_SECOND, INTERVAL_YEAR, INTERVAL_YEAR_TO_MONTH, JAVA_OBJECT, JSON, LONG, MIN_LONG_DECIMAL, NULL, RESULT_SET, ROW, SHORT, STRING, STRING_FIXED, STRING_IGNORECASE, TIME, TIME_TZ, TIMESTAMP, TIMESTAMP_TZ, TYPE_COUNT, UNKNOWN, UUID`

### Fields inherited from class org.h2.value.VersionedValue

`DUMMY`

### Method Summary

Methods
`int` `compareTypeSafe(Value v, CompareMode mode, CastDataProvider provider)` Compare this value against another value given that the values are of the same data type.
`boolean` `equals(java.lang.Object other)` Check if the two values have the same hash code.
`static ValueResultSet` `get(ResultInterface result, int maxrows)` Create a result set value for the given result.
`static ValueResultSet` `get(SessionInterface session, java.sql.ResultSet rs, int maxrows)` Create a result set value for the given result set.
`static ValueResultSet` `get(SimpleResult result)` Create a result set value.
`int` `getMemory()` Get the memory used by this object.
`java.lang.Object` `getObject()` Get the value as an object.
`ResultInterface` `getResult()` Returns result for result set value, or single-row result with this value in column X for other values.
`java.lang.StringBuilder` `getSQL(java.lang.StringBuilder builder)` Appends the SQL expression for this value to the specified builder.
`java.lang.String` `getString()` Get the value as a string.
`TypeInfo` `getType()` Returns the data type.
`int` `getValueType()` Get the value type.
`int` `hashCode()`
`void` `set(java.sql.PreparedStatement prep, int parameterIndex)` Set the value as a parameter in a prepared statement.

### Methods inherited from class org.h2.value.Value

`add, checkPrecision, clearCache, compareTo, compareWithNull, containsNull, convertPrecision, convertScale, convertTo, convertTo, convertTo, convertTo, convertToInt, copy, copyToResult, copyToTemp, divide, getBigDecimal, getBoolean, getByte, getBytes, getBytesNoCopy, getDataHandler, getDate, getDouble, getFloat, getHigherOrder, getHigherType, getInputStream, getInputStream, getInt, getLong, getReader, getReader, getShort, getSignum, getSmall, getSQL, getTableId, getTime, getTimestamp, getTraceSQL, getUnsupportedExceptionForOperation, isLinkedToTable, modulus, multiply, negate, remove, subtract, toString`

### Methods inherited from class org.h2.value.VersionedValue

`getCommittedValue, getCurrentValue, getOperationId, isCommitted`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Method Detail

#### get

    public static ValueResultSet get(SimpleResult result)

Create a result set value.

Parameters:
  `result` - the result
Returns:
  the value

#### get

    public static ValueResultSet get(SessionInterface session,
                     java.sql.ResultSet rs,
                     int maxrows)

Create a result set value for the given result set. The result set will be fully read in memory. The original result set is not closed.

Parameters:
  `session` - the session
  `rs` - the result set
  `maxrows` - the maximum number of rows to read (0 to just read the meta data)
Returns:
  the value

#### get

    public static ValueResultSet get(ResultInterface result,
                     int maxrows)

Create a result set value for the given result. The result will be fully read in memory. The original result is not closed.

Parameters:
  `result` - result
  `maxrows` - the maximum number of rows to read (0 to just read the meta data)
Returns:
  the value

#### getType

    public TypeInfo getType()

Description copied from class: `Value`
Returns the data type.

Specified by:
  `getType` in class `Value`
Returns:
  the data type

#### getValueType

    public int getValueType()

Description copied from class: `Value`
Get the value type.

Specified by:
  `getValueType` in class `Value`
Returns:
  the value type

#### getMemory

    public int getMemory()

Description copied from class: `Value`
Get the memory used by this object.

Overrides:
  `getMemory` in class `Value`
Returns:
  the memory used in bytes

#### getString

    public java.lang.String getString()

Description copied from class: `Value`
Get the value as a string.

Specified by:
  `getString` in class `Value`
Returns:
  the string

#### compareTypeSafe

    public int compareTypeSafe(Value v,
                      CompareMode mode,
                      CastDataProvider provider)

Description copied from class: `Value`
Compare this value against another value given that the values are of the same data type.

Specified by:
  `compareTypeSafe` in class `Value`
Parameters:
  `v` - the other value
  `mode` - the compare mode
  `provider` - the cast information provider
Returns:
  0 if both values are equal, -1 if the other value is smaller, and 1 otherwise

#### equals

    public boolean equals(java.lang.Object other)

Description copied from class: `Value`
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.

Specified by:
  `equals` in class `Value`
Parameters:
  `other` - the other value
Returns:
  true if they are equal

#### hashCode

    public int hashCode()

Specified by:
  `hashCode` in class `Value`

#### getObject

    public java.lang.Object getObject()

Description copied from class: `Value`
Get the value as an object.

Specified by:
  `getObject` in class `Value`
Returns:
  the object

#### getResult

    public ResultInterface getResult()

Description copied from class: `Value`
Returns result for result set value, or single-row result with this value in column X for other values.

Overrides:
  `getResult` in class `Value`
Returns:
  result

#### set

    public void set(java.sql.PreparedStatement prep,
           int parameterIndex)

Description copied from class: `Value`
Set the value as a parameter in a prepared statement.

Specified by:
  `set` in class `Value`
Parameters:
  `prep` - the prepared statement
  `parameterIndex` - the parameter index

#### getSQL

    public java.lang.StringBuilder getSQL(java.lang.StringBuilder builder)

Description copied from class: `Value`
Appends the SQL expression for this value to the specified builder.

Specified by:
  `getSQL` in class `Value`
Parameters:
  `builder` - string builder
Returns:
  the specified string builder