ValueLobDb
A implementation of the BLOB and CLOB 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.
| Methods |
| static ValueLobDb |
create(int type, DataHandler handler, int tableId, long id, byte[] hmac, long precision)
Create a LOB value.
|
| static ValueLobDb |
create(int type, DataHandler handler, int tableId, long id, byte[] hmac, long precision)
Create a LOB value.
Parameters:
type - the type
handler - the data handler
tableId - the table id
id - the lob id
hmac - the message authentication code
precision - the precision (number of bytes / characters)
Returns:
the value
|
| static Value |
createSmallLob(int type, byte[] small)
Create a LOB object that fits in memory.
|
| static Value |
createSmallLob(int type, byte[] small)
Create a LOB object that fits in memory.
Parameters:
type - the type (Value.BLOB or CLOB)
small - the byte array
Returns:
the LOB
|
| static ValueLobDb |
createSmallLob(int type, byte[] small, long precision)
Create a LOB object that fits in memory.
|
| static ValueLobDb |
createSmallLob(int type, byte[] small, long precision)
Create a LOB object that fits in memory.
Parameters:
type - the type (Value.BLOB or CLOB)
small - the byte array
precision - the precision
Returns:
the LOB
|
| static ValueLobDb |
createTempBlob(InputStream in, long length, DataHandler handler)
Create a temporary BLOB value from a stream.
|
| static ValueLobDb |
createTempBlob(InputStream in, long length, DataHandler handler)
Create a temporary BLOB value from a stream.
Parameters:
in - the input stream
length - the number of characters to read, or -1 for no limit
handler - the data handler
Returns:
the lob value
|
| static ValueLobDb |
createTempClob(Reader in, long length, DataHandler handler)
Create a temporary CLOB value from a stream.
|
| static ValueLobDb |
createTempClob(Reader in, long length, DataHandler handler)
Create a temporary CLOB value from a stream.
Parameters:
in - the reader
length - the number of characters to read, or -1 for no limit
handler - the data handler
Returns:
the lob value
|
| int |
compareSecure(Value v, CompareMode mode)
|
| int |
compareSecure(Value v, CompareMode mode)
|
| Value |
convertPrecision(long precision, boolean force)
|
| Value |
convertPrecision(long precision, boolean force)
|
| Value |
convertTo(int t, int precision, Mode mode, Object column, String[] enumerators)
Convert a lob to another data type.
|
| Value |
convertTo(int t, int precision, Mode mode, Object column, String[] enumerators)
Convert a lob to another data type. The data is fully read in memory
except when converting to BLOB or CLOB.
Parameters:
t - the new type
precision - the precision
mode - the mode
column - the column (if any), used for to improve the error message if conversion fails
enumerators - the ENUM datatype enumerators (if any),
for dealing with ENUM conversions
Returns:
the converted value
|
| Value |
copy(DataHandler database, int tableId)
|
| Value |
copy(DataHandler database, int tableId)
|
| ValueLobDb |
copyToResult()
Create an independent copy of this value,
that will be bound to a result.
|
| ValueLobDb |
copyToResult()
Create an independent copy of this value,
that will be bound to a result.
Returns:
the value (this for small objects)
|
| ValueLobDb |
copyToTemp()
Create an independent copy of this temporary value.
|
| ValueLobDb |
copyToTemp()
Create an independent copy of this temporary value.
The file will not be deleted automatically.
Returns:
the value
|
| boolean |
equals(Object other)
|
| boolean |
equals(Object other)
|
| byte[] |
getBytes()
|
| byte[] |
getBytes()
|
| byte[] |
getBytesNoCopy()
|
| byte[] |
getBytesNoCopy()
|
| int |
getDisplaySize()
|
| int |
getDisplaySize()
|
| InputStream |
getInputStream()
|
| InputStream |
getInputStream()
|
| InputStream |
getInputStream(long oneBasedOffset, long length)
|
| InputStream |
getInputStream(long oneBasedOffset, long length)
|
| long |
getLobId()
|
| long |
getLobId()
|
| int |
getMemory()
|
| int |
getMemory()
|
| Object |
getObject()
|
| Object |
getObject()
|
| long |
getPrecision()
|
| long |
getPrecision()
|
| Reader |
getReader()
|
| Reader |
getReader()
|
| Reader |
getReader(long oneBasedOffset, long length)
|
| Reader |
getReader(long oneBasedOffset, long length)
|
| String |
getSQL()
|
| String |
getSQL()
|
| byte[] |
getSmall()
Get the data if this a small lob value.
|
| byte[] |
getSmall()
Get the data if this a small lob value.
Returns:
the data
|
| String |
getString()
|
| String |
getString()
|
| int |
getTableId()
Get the current table id of this lob.
|
| int |
getTableId()
Get the current table id of this lob.
Returns:
the table id
|
| String |
getTraceSQL()
|
| String |
getTraceSQL()
|
| int |
getType()
|
| int |
getType()
|
| int |
hashCode()
|
| int |
hashCode()
|
| boolean |
isLinkedToTable()
|
| boolean |
isLinkedToTable()
|
| boolean |
isRecoveryReference()
|
| boolean |
isRecoveryReference()
|
| boolean |
isStored()
|
| boolean |
isStored()
|
| void |
remove()
|
| void |
remove()
|
| void |
set(PreparedStatement prep, int parameterIndex)
|
| void |
set(PreparedStatement prep, int parameterIndex) throws SQLException
|
| void |
setRecoveryReference(boolean isRecoveryReference)
|
| void |
setRecoveryReference(boolean isRecoveryReference)
|
| String |
toString()
|
| String |
toString()
|
|