Class ValueLob
A implementation of the BINARY LARGE OBJECT and CHARACTER LARGE OBJECT data
types. Small objects are kept in memory and stored in the record. Large
objects are either stored in the database, or in temporary files.
-
Field Summary
Fields inherited from class Value
ARRAY, BIGINT, BINARY, BLOB, BOOLEAN, CHAR, CLOB, 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, 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 HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS -
Method Summary
Modifier and TypeMethodDescriptionabstract ValueLobcopy(DataHandler database, int tableId) Copy a large value, to be used in the given table.Create an independent copy of this value, that will be bound to a result.booleanCheck if the two values have the same hash code.byte[]getBytes()byte[]intGet the memory used by this object.getType()Returns the data type.inthashCode()booleanCheck if this value is linked to a specific table.protected static InputStreamrangeInputStream(InputStream inputStream, long oneBasedOffset, long length, long dataSize) Create an input stream that is s subset of the given stream.voidremove()Remove the underlying resource, if any.Methods inherited from class Value
add, castTo, charLength, clearCache, compareTo, compareTypeSafe, compareWithNull, containsNull, convertForAssignTo, convertTo, convertTo, convertTo, convertTo, convertTo, convertToAnyArray, convertToAnyRow, convertToBigint, convertToBoolean, convertToChar, convertToDate, convertToDouble, convertToEnum, convertToGeometry, convertToInt, convertToInt, convertToJavaObject, convertToReal, convertToSmallint, convertToTinyint, convertToUuid, divide, getBigDecimal, getBoolean, getByte, getDouble, getFloat, getHigherOrder, getInputStream, getInputStream, getInt, getLong, getReader, getShort, getSignum, getString, getTypeName, getUnsupportedExceptionForOperation, getValueType, isFalse, isTrue, modulus, multiply, negate, octetLength, subtract, toStringMethods inherited from class VersionedValue
getCommittedValue, getCurrentValue, getOperationId, isCommittedMethods inherited from interface HasSQL
getSQL, getSQL, getTraceSQL
-
Method Details
-
rangeInputStream
protected static InputStream rangeInputStream(InputStream inputStream, long oneBasedOffset, long length, long dataSize) Create an input stream that is s subset of the given stream.- Parameters:
inputStream- the source input streamoneBasedOffset- the offset (1 means no offset)length- the length of the result, in bytesdataSize- the length of the input, in bytes- Returns:
- the smaller input stream
-
isLinkedToTable
public boolean isLinkedToTable()Check if this value is linked to a specific table. For values that are kept fully in memory, this method returns false.- Returns:
- true if it is
-
remove
public void remove()Remove the underlying resource, if any. For values that are kept fully in memory this method has no effect. -
copy
Copy a large value, to be used in the given table. For values that are kept fully in memory this method has no effect.- Parameters:
database- the data handlertableId- the table where this object is used- Returns:
- the new value or itself
-
getType
-
getReader
-
getBytes
-
getBytesNoCopy
public byte[] getBytesNoCopy()- Overrides:
getBytesNoCopyin classValue
-
hashCode
-
equals
Description copied from class:ValueCheck 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. -
getMemory
-
getLobData
-
copyToResult
Create an independent copy of this value, that will be bound to a result.- Returns:
- the value (this for small objects)
-