public class ValueLobDb extends Value implements Value.ValueClob, Value.ValueBlob
Value.ValueBlob, Value.ValueClobARRAY, BLOB, BOOLEAN, BYTE, BYTES, CLOB, DATE, DECIMAL, DOUBLE, FLOAT, GEOMETRY, INT, JAVA_OBJECT, LONG, NULL, RESULT_SET, SHORT, STRING, STRING_FIXED, STRING_IGNORECASE, TIME, TIMESTAMP, TIMESTAMP_TZ, TYPE_COUNT, UNKNOWN, UUID| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
compareSecure(Value v,
CompareMode mode)
Compare the value with another value of the same type.
|
Value |
convertPrecision(long precision,
boolean force)
Convert the precision to the requested value.
|
Value |
convertTo(int t)
Convert a lob to another data type.
|
Value |
copy(DataHandler database,
int tableId)
Copy a large value, to be used in the given table.
|
ValueLobDb |
copyToResult()
Create an independent copy of this value,
that will be bound to a result.
|
ValueLobDb |
copyToTemp()
Create an independent copy of this temporary value.
|
static ValueLobDb |
create(int type,
DataHandler handler,
int tableId,
long id,
byte[] hmac,
long precision)
Create a LOB value.
|
static Value |
createSmallLob(int type,
byte[] small)
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.
|
static ValueLobDb |
createTempBlob(InputStream in,
long length,
DataHandler handler)
Create a temporary BLOB value from a stream.
|
static ValueLobDb |
createTempClob(Reader in,
long length,
DataHandler handler)
Create a temporary CLOB value from a stream.
|
boolean |
equals(Object other)
Check if the two values have the same hash code.
|
byte[] |
getBytes() |
byte[] |
getBytesNoCopy() |
int |
getDisplaySize()
Get the display size in characters.
|
InputStream |
getInputStream() |
long |
getLobId() |
int |
getMemory()
Get the memory used by this object.
|
Object |
getObject()
Get the value as an object.
|
long |
getPrecision()
Get the precision.
|
Reader |
getReader() |
byte[] |
getSmall()
Get the data if this a small lob value.
|
String |
getSQL()
Get the SQL expression for this value.
|
String |
getString()
Get the value as a string.
|
int |
getTableId()
Get the current table id of this lob.
|
String |
getTraceSQL()
Get a medium size SQL expression for debugging or tracing.
|
int |
getType()
Get the value type.
|
int |
hashCode() |
boolean |
isLinkedToTable()
Check if this value is linked to a specific table.
|
boolean |
isRecoveryReference() |
boolean |
isStored() |
void |
remove()
Remove the underlying resource, if any.
|
void |
set(PreparedStatement prep,
int parameterIndex)
Set the value as a parameter in a prepared statement.
|
void |
setRecoveryReference(boolean isRecoveryReference) |
String |
toString() |
add, checkPrecision, clearCache, compareTo, compareTypeSafe, convertScale, divide, getBigDecimal, getBoolean, getByte, getDataHandler, getDate, getDouble, getFloat, getHigherOrder, getInt, getLong, getResultSet, getScale, getShort, getSignum, getTime, getTimestamp, modulus, multiply, negate, subtract, throwUnsupportedExceptionForTypepublic static ValueLobDb create(int type, DataHandler handler, int tableId, long id, byte[] hmac, long precision)
type - the typehandler - the data handlertableId - the table idid - the lob idhmac - the message authentication codeprecision - the precision (number of bytes / characters)public Value convertTo(int t)
public boolean isLinkedToTable()
ValueisLinkedToTable 在类中 Valuepublic boolean isStored()
public void remove()
Valuepublic Value copy(DataHandler database, int tableId)
Valuepublic int getTableId()
getTableId 在类中 Valuepublic long getPrecision()
ValuegetPrecision 在类中 Valuepublic byte[] getBytesNoCopy()
getBytesNoCopy 在类中 Valueprotected int compareSecure(Value v, CompareMode mode)
ValuecompareSecure 在类中 Valuev - the other valuemode - the compare modepublic InputStream getInputStream()
getInputStream 在类中 Valuepublic void set(PreparedStatement prep, int parameterIndex) throws SQLException
Valueset 在类中 Valueprep - the prepared statementparameterIndex - the parameter indexSQLExceptionpublic String getTraceSQL()
ValuegetTraceSQL 在类中 Valuepublic byte[] getSmall()
public int getDisplaySize()
ValuegetDisplaySize 在类中 Valuepublic boolean equals(Object other)
Valuepublic int getMemory()
Valuepublic ValueLobDb copyToTemp()
copyToTemp 在类中 Valuepublic ValueLobDb copyToResult()
copyToResult 在类中 Valuepublic long getLobId()
public static ValueLobDb createTempClob(Reader in, long length, DataHandler handler)
in - the readerlength - the number of characters to read, or -1 for no limithandler - the data handlerpublic static ValueLobDb createTempBlob(InputStream in, long length, DataHandler handler)
in - the input streamlength - the number of characters to read, or -1 for no limithandler - the data handlerpublic Value convertPrecision(long precision, boolean force)
ValueconvertPrecision 在类中 Valueprecision - the new precisionforce - true if losing numeric precision is allowedpublic static Value createSmallLob(int type, byte[] small)
type - the type (Value.BLOB or CLOB)small - the byte arraypublic static ValueLobDb createSmallLob(int type, byte[] small, long precision)
type - the type (Value.BLOB or CLOB)small - the byte arrayprecision - the precisionpublic void setRecoveryReference(boolean isRecoveryReference)
public boolean isRecoveryReference()
Copyright © 2017. All rights reserved.