public class ScriptCommand extends Prepared
| Modifier and Type | Field and Description |
|---|---|
protected java.io.InputStream |
in
The input stream.
|
protected java.io.OutputStream |
out
The output stream.
|
create, parameters, prepareAlways, session, sqlStatement| Constructor and Description |
|---|
ScriptCommand(Session session) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkPowerOff()
Check if the simulated power failure occurred.
|
void |
checkWritingAllowed()
Check if writing is allowed.
|
static java.io.InputStream |
combineBlob(java.sql.Connection conn,
int id)
Combine a BLOB.
|
static java.io.Reader |
combineClob(java.sql.Connection conn,
int id)
Combine a CLOB.
|
CompareMode |
getCompareMode()
Return compare mode.
|
java.lang.String |
getDatabasePath()
Get the database path.
|
protected java.lang.String |
getFileName() |
JavaObjectSerializer |
getJavaObjectSerializer()
Return the serializer to be used for java objects being stored in
column of type OTHER.
|
java.lang.String |
getLobCompressionAlgorithm(int type)
Get the compression algorithm used for large objects.
|
SmallLRUCache<java.lang.String,java.lang.String[]> |
getLobFileListCache()
Get the lob file list cache if it is used.
|
LobStorageBackend |
getLobStorage()
Get the lob storage mechanism to use.
|
java.lang.Object |
getLobSyncObject()
Get the synchronization object for lob operations.
|
int |
getMaxLengthInplaceLob()
Get the maximum length of a in-place large object
|
TempFileDeleter |
getTempFileDeleter()
Get the temp file deleter mechanism.
|
int |
getType()
Get the command type as defined in CommandInterface
|
boolean |
isQuery()
Check if this object is a query.
|
boolean |
isTransactional()
Check if this command is transactional.
|
boolean |
needRecompile()
Check if the statement needs to be re-compiled.
|
FileStore |
openFile(java.lang.String name,
java.lang.String mode,
boolean mustExist)
Open a file at the given location.
|
ResultInterface |
query(int maxrows)
Execute the query.
|
ResultInterface |
queryMeta()
Get an empty result set containing the meta data.
|
int |
readLob(long lobId,
byte[] hmac,
long offset,
byte[] buff,
int off,
int length)
Read from a lob.
|
void |
setCharset(java.nio.charset.Charset charset) |
void |
setCipher(java.lang.String c) |
void |
setCompressionAlgorithm(java.lang.String algorithm) |
void |
setData(boolean data) |
void |
setDrop(boolean drop) |
void |
setFileNameExpr(Expression file) |
void |
setLobBlockSize(long blockSize) |
void |
setPassword(Expression password) |
void |
setPasswords(boolean passwords) |
void |
setSchemaNames(java.util.Set<java.lang.String> schemaNames) |
void |
setSettings(boolean settings) |
void |
setSimple(boolean simple) |
void |
setTables(java.util.Collection<Table> tables) |
checkCanceled, checkParameters, getCteCleanups, getCurrentObjectId, getCurrentRowNumber, getObjectId, getParameters, getPlanSQL, getSession, getSQL, getSQL, getSQL, isCacheable, isReadOnly, prepare, setCommand, setCteCleanups, setCurrentRowNumber, setObjectId, setParameterList, setPrepareAlways, setRow, setSession, setSQL, toString, updateprotected java.io.OutputStream out
protected java.io.InputStream in
public ScriptCommand(Session session)
public boolean isQuery()
Preparedpublic void setSchemaNames(java.util.Set<java.lang.String> schemaNames)
public void setTables(java.util.Collection<Table> tables)
public void setData(boolean data)
public void setPasswords(boolean passwords)
public void setSettings(boolean settings)
public void setLobBlockSize(long blockSize)
public void setDrop(boolean drop)
public ResultInterface queryMeta()
Preparedpublic ResultInterface query(int maxrows)
Preparedpublic static java.io.InputStream combineBlob(java.sql.Connection conn,
int id)
throws java.sql.SQLException
conn - a connectionid - the lob idjava.sql.SQLExceptionpublic static java.io.Reader combineClob(java.sql.Connection conn,
int id)
throws java.sql.SQLException
conn - a connectionid - the lob idjava.sql.SQLExceptionpublic void setSimple(boolean simple)
public void setCharset(java.nio.charset.Charset charset)
public int getType()
Preparedpublic void setCipher(java.lang.String c)
public void setPassword(Expression password)
public void setFileNameExpr(Expression file)
protected java.lang.String getFileName()
public boolean isTransactional()
PreparedisTransactional in class Preparedpublic boolean needRecompile()
PreparedneedRecompile in class Preparedpublic java.lang.String getDatabasePath()
DataHandlergetDatabasePath in interface DataHandlerpublic FileStore openFile(java.lang.String name, java.lang.String mode, boolean mustExist)
DataHandleropenFile in interface DataHandlername - the file namemode - the modemustExist - whether the file must already existpublic void checkPowerOff()
DataHandlercheckPowerOff in interface DataHandlerpublic void checkWritingAllowed()
DataHandlercheckWritingAllowed in interface DataHandlerpublic int getMaxLengthInplaceLob()
DataHandlergetMaxLengthInplaceLob in interface DataHandlerpublic TempFileDeleter getTempFileDeleter()
DataHandlergetTempFileDeleter in interface DataHandlerpublic java.lang.String getLobCompressionAlgorithm(int type)
DataHandlergetLobCompressionAlgorithm in interface DataHandlertype - the data type (CLOB or BLOB)public void setCompressionAlgorithm(java.lang.String algorithm)
public java.lang.Object getLobSyncObject()
DataHandlergetLobSyncObject in interface DataHandlerpublic SmallLRUCache<java.lang.String,java.lang.String[]> getLobFileListCache()
DataHandlergetLobFileListCache in interface DataHandlerpublic LobStorageBackend getLobStorage()
DataHandlergetLobStorage in interface DataHandlerpublic int readLob(long lobId,
byte[] hmac,
long offset,
byte[] buff,
int off,
int length)
DataHandlerreadLob in interface DataHandlerlobId - the lob idhmac - the message authentication codeoffset - the offset within the lobbuff - the target bufferoff - the offset within the target bufferlength - the number of bytes to readpublic JavaObjectSerializer getJavaObjectSerializer()
DataHandlergetJavaObjectSerializer in interface DataHandlerpublic CompareMode getCompareMode()
DataHandlergetCompareMode in interface DataHandler