Package org.h2.result
Class DefaultRow
java.lang.Object
org.h2.value.VersionedValue<Value>
org.h2.value.Value
org.h2.result.SearchRow
org.h2.result.Row
org.h2.result.DefaultRow
- Direct Known Subclasses:
Sparse
The default implementation of a row in a table.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Value[]The values of the row (one entry per column).static final intThe constant that means "memory usage is unknown and needs to be calculated first".Fields inherited from class org.h2.result.SearchRow
key, MATCH_ALL_ROW_KEY, ROWID_INDEXFields inherited from class org.h2.value.Value
ARRAY, ASSIGN_TO, BIGINT, BINARY, BLOB, BOOLEAN, CAST_TO, CHAR, CLOB, CONVERT_TO, DATE, DECFLOAT, DOUBLE, EMPTY_VALUES, ENUM, GEOMETRY, INTEGER, 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, MAX_LONG_DECIMAL, MIN_LONG_DECIMAL, NULL, NUMERIC, REAL, ROW, SMALLINT, TIME, TIME_TZ, TIMESTAMP, TIMESTAMP_TZ, TINYINT, TYPE_COUNT, UNKNOWN, UUID, VARBINARY, VARCHAR, VARCHAR_IGNORECASEFields inherited from interface org.h2.util.HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intCalculate the estimated memory used for this row, in bytes.voidCopy all relevant values from the source to this row.intGet the column count.intGet the estimated memory used for this row, in bytes.getValue(int i) Get the value for the columnValue[]Get values.booleanhasSharedData(Row other) Check whether this row and the specified row share the same underlying data with values.voidSet the value for given columntoString()Methods inherited from class org.h2.result.Row
get, get, hasSameValuesMethods inherited from class org.h2.result.SearchRow
compareTypeSafe, equals, getKey, getSQL, getString, getType, getValueType, hashCode, isNull, setKeyMethods inherited from class org.h2.value.Value
add, castTo, charLength, clearCache, compareTo, compareWithNull, containsNull, convertForAssignTo, convertTo, convertTo, convertTo, convertTo, convertTo, convertToAnyArray, convertToAnyJson, convertToAnyRow, convertToBigint, convertToBoolean, convertToChar, convertToDate, convertToDouble, convertToEnum, convertToGeometry, convertToInt, convertToInt, convertToJavaObject, convertToJson, convertToLong, convertToReal, convertToSmallint, convertToTinyint, convertToUuid, divide, getBigDecimal, getBigInteger, getBoolean, getByte, getBytes, getBytesNoCopy, getDouble, getFloat, getHigherOrder, getInputStream, getInputStream, getInt, getLong, getReader, getReader, getShort, getSignum, getTypeName, getUnsupportedExceptionForOperation, getValueWithFirstNull, isFalse, isTrue, modulus, multiply, negate, octetLength, subtractMethods inherited from class org.h2.value.VersionedValue
getCommittedValue, getCurrentValue, getOperationId, isCommittedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.h2.util.HasSQL
getSQL, getTraceSQL
-
Field Details
-
MEMORY_CALCULATE
public static final int MEMORY_CALCULATEThe constant that means "memory usage is unknown and needs to be calculated first".- See Also:
-
data
The values of the row (one entry per column).
-
-
Constructor Details
-
DefaultRow
-
DefaultRow
-
-
Method Details
-
getValue
Description copied from class:SearchRowGet the value for the column -
setValue
Description copied from class:SearchRowSet the value for given column -
getColumnCount
public int getColumnCount()Description copied from class:SearchRowGet the column count.- Specified by:
getColumnCountin classSearchRow- Returns:
- the column count
-
getMemory
public int getMemory()Description copied from class:SearchRowGet the estimated memory used for this row, in bytes. -
toString
-
calculateMemory
protected int calculateMemory()Calculate the estimated memory used for this row, in bytes.- Returns:
- the memory
-
getValueList
Description copied from class:RowGet values.- Specified by:
getValueListin classRow- Returns:
- values
-
copyFrom
Description copied from class:SearchRowCopy all relevant values from the source to this row.
-