public class ScriptCommand extends Prepared
Modifier and Type | Field and Description |
---|---|
protected InputStream |
in
The input stream.
|
protected 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 InputStream |
combineBlob(Connection conn,
int id)
Combine a BLOB.
|
static Reader |
combineClob(Connection conn,
int id)
Combine a CLOB.
|
void |
freeUpDiskSpace()
Free up disk space if possible.
|
String |
getDatabasePath()
Get the database path.
|
protected String |
getFileName() |
String |
getLobCompressionAlgorithm(int type)
Get the compression algorithm used for large objects.
|
Connection |
getLobConnection()
Get a database connection to be used for LOB access.
|
SmallLRUCache<String,String[]> |
getLobFileListCache()
Get the lob file list cache if it is used.
|
LobStorage |
getLobStorage()
Get the lob storage mechanism to use.
|
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(String name,
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.
|
void |
setCharset(String charset) |
void |
setCipher(String c) |
void |
setCompressionAlgorithm(String algorithm) |
void |
setData(boolean data) |
void |
setDrop(boolean drop) |
void |
setFileNameExpr(Expression file) |
void |
setLobBlockSize(long blockSize) |
void |
setPassword(char[] password) |
void |
setPasswords(boolean passwords) |
void |
setSettings(boolean settings) |
void |
setSimple(boolean simple) |
checkCanceled, checkParameters, getCurrentObjectId, getCurrentRowNumber, getObjectId, getParameters, getPlanSQL, getSQL, getSQL, getSQL, isCacheable, isReadOnly, prepare, setCommand, setCurrentRowNumber, setObjectId, setParameterList, setPrepareAlways, setRow, setSession, setSQL, toString, update
protected OutputStream out
protected InputStream in
public ScriptCommand(Session session)
public boolean isQuery()
Prepared
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()
Prepared
public ResultInterface query(int maxrows)
Prepared
public static InputStream combineBlob(Connection conn, int id) throws SQLException
conn
- a connectionid
- the lob idSQLException
public static Reader combineClob(Connection conn, int id) throws SQLException
conn
- a connectionid
- the lob idSQLException
public void setSimple(boolean simple)
public void setCharset(String charset)
public int getType()
Prepared
public void setCipher(String c)
public void setPassword(char[] password)
public void setFileNameExpr(Expression file)
protected String getFileName()
public boolean isTransactional()
Prepared
isTransactional
in class Prepared
public boolean needRecompile()
Prepared
needRecompile
in class Prepared
public String getDatabasePath()
DataHandler
getDatabasePath
in interface DataHandler
public FileStore openFile(String name, String mode, boolean mustExist)
DataHandler
openFile
in interface DataHandler
name
- the file namemode
- the modemustExist
- whether the file must already existpublic void checkPowerOff()
DataHandler
checkPowerOff
in interface DataHandler
public void checkWritingAllowed()
DataHandler
checkWritingAllowed
in interface DataHandler
public void freeUpDiskSpace()
DataHandler
freeUpDiskSpace
in interface DataHandler
public int getMaxLengthInplaceLob()
DataHandler
getMaxLengthInplaceLob
in interface DataHandler
public TempFileDeleter getTempFileDeleter()
DataHandler
getTempFileDeleter
in interface DataHandler
public String getLobCompressionAlgorithm(int type)
DataHandler
getLobCompressionAlgorithm
in interface DataHandler
type
- the data type (CLOB or BLOB)public void setCompressionAlgorithm(String algorithm)
public Object getLobSyncObject()
DataHandler
getLobSyncObject
in interface DataHandler
public SmallLRUCache<String,String[]> getLobFileListCache()
DataHandler
getLobFileListCache
in interface DataHandler
public LobStorage getLobStorage()
DataHandler
getLobStorage
in interface DataHandler
public Connection getLobConnection()
DataHandler
getLobConnection
in interface DataHandler
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.