|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.command.Prepared
org.h2.command.dml.ScriptBase
public abstract class ScriptBase
This class is the base for RunScriptCommand and ScriptCommand.
| Field Summary | |
|---|---|
protected java.io.InputStream |
in
The input stream. |
protected java.io.OutputStream |
out
The output stream. |
| Fields inherited from class org.h2.command.Prepared |
|---|
headPos, parameters, prepareAlways, session, sqlStatement |
| Constructor Summary | |
|---|---|
ScriptBase(Session session)
|
|
| Method Summary | |
|---|---|
int |
allocateObjectId(boolean b,
boolean c)
Get the next object id. |
void |
checkPowerOff()
Check if the simulated power failure occurred. |
void |
checkWritingAllowed()
Check if writing is allowed. |
int |
compareTypeSave(Value a,
Value b)
Compare two values. |
java.lang.String |
createTempFile()
Create a temporary file and return the file name. |
void |
freeUpDiskSpace()
Free up disk space if possible. |
int |
getChecksum(byte[] data,
int start,
int end)
Calculate the checksum for the byte array. |
java.lang.String |
getDatabasePath()
Get the database path. |
protected java.lang.String |
getFileName()
|
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. |
boolean |
getLobFilesInDirectories()
Checks if the lob files stored in directories. |
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. |
Trace |
getTrace()
Get the trace writer. |
void |
handleInvalidChecksum()
Called when the checksum was invalid. |
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. |
void |
setCipher(java.lang.String c)
|
void |
setCompressionAlgorithm(java.lang.String algorithm)
|
void |
setFileNameExpr(Expression file)
|
void |
setPassword(char[] password)
|
| Methods inherited from class org.h2.command.Prepared |
|---|
checkCanceled, checkParameters, getCurrentObjectId, getCurrentRowNumber, getObjectId, getParameters, getPlanSQL, getSQL, getSQL, getSQL, isQuery, isReadOnly, prepare, query, queryMeta, setCommand, setCurrentRowNumber, setHeadPos, setObjectId, setParameterList, setPrepareAlways, setRow, setSession, setSQL, toString, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.io.OutputStream out
protected java.io.InputStream in
| Constructor Detail |
|---|
public ScriptBase(Session session)
| Method Detail |
|---|
public void setCipher(java.lang.String c)
public void setPassword(char[] password)
public void setFileNameExpr(Expression file)
protected java.lang.String getFileName()
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isTransactional()
Prepared
isTransactional in class Preparedpublic boolean needRecompile()
Prepared
needRecompile in class Preparedpublic java.lang.String getDatabasePath()
DataHandler
getDatabasePath in interface DataHandler
public FileStore openFile(java.lang.String name,
java.lang.String mode,
boolean mustExist)
DataHandler
openFile in interface DataHandlername - the file namemode - the modemustExist - whether the file must already exist
public int getChecksum(byte[] data,
int start,
int end)
DataHandler
getChecksum in interface DataHandlerdata - the byte arraystart - the starting offsetend - the end offset
public void checkPowerOff()
throws java.sql.SQLException
DataHandler
checkPowerOff in interface DataHandlerjava.sql.SQLException - if the simulated power failure occurred
public void checkWritingAllowed()
throws java.sql.SQLException
DataHandler
checkWritingAllowed in interface DataHandlerjava.sql.SQLException - if it is not allowed
public void freeUpDiskSpace()
throws java.sql.SQLException
DataHandler
freeUpDiskSpace in interface DataHandlerjava.sql.SQLException - if no more space could be freed
public void handleInvalidChecksum()
throws java.sql.SQLException
DataHandler
handleInvalidChecksum in interface DataHandlerjava.sql.SQLException - if this should not be ignored
public int compareTypeSave(Value a,
Value b)
DataHandler
compareTypeSave in interface DataHandlera - the first valueb - the second value
public int getMaxLengthInplaceLob()
DataHandler
getMaxLengthInplaceLob in interface DataHandler
public int allocateObjectId(boolean b,
boolean c)
DataHandler
allocateObjectId in interface DataHandlerb - if a fresh id is requiredc - true if the id is for the data file
public java.lang.String createTempFile()
throws java.sql.SQLException
DataHandler
createTempFile in interface DataHandlerjava.sql.SQLExceptionpublic TempFileDeleter getTempFileDeleter()
DataHandler
getTempFileDeleter in interface DataHandlerpublic java.lang.String getLobCompressionAlgorithm(int type)
DataHandler
getLobCompressionAlgorithm in interface DataHandlertype - the data type (CLOB or BLOB)
public void setCompressionAlgorithm(java.lang.String algorithm)
public java.lang.Object getLobSyncObject()
DataHandler
getLobSyncObject in interface DataHandlerpublic boolean getLobFilesInDirectories()
DataHandler
getLobFilesInDirectories in interface DataHandlerpublic SmallLRUCache<java.lang.String,java.lang.String[]> getLobFileListCache()
DataHandler
getLobFileListCache in interface DataHandlerpublic Trace getTrace()
DataHandler
getTrace in interface DataHandler
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||