|
||||||||||
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.SQLException
public boolean isTransactional()
Prepared
isTransactional
in class Prepared
public boolean needRecompile()
Prepared
needRecompile
in class Prepared
public 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 DataHandler
name
- the file namemode
- the modemustExist
- whether the file must already exist
public int getChecksum(byte[] data, int start, int end)
DataHandler
getChecksum
in interface DataHandler
data
- the byte arraystart
- the starting offsetend
- the end offset
public void checkPowerOff() throws java.sql.SQLException
DataHandler
checkPowerOff
in interface DataHandler
java.sql.SQLException
- if the simulated power failure occurredpublic void checkWritingAllowed() throws java.sql.SQLException
DataHandler
checkWritingAllowed
in interface DataHandler
java.sql.SQLException
- if it is not allowedpublic void freeUpDiskSpace() throws java.sql.SQLException
DataHandler
freeUpDiskSpace
in interface DataHandler
java.sql.SQLException
- if no more space could be freedpublic void handleInvalidChecksum() throws java.sql.SQLException
DataHandler
handleInvalidChecksum
in interface DataHandler
java.sql.SQLException
- if this should not be ignoredpublic int compareTypeSave(Value a, Value b)
DataHandler
compareTypeSave
in interface DataHandler
a
- 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 DataHandler
b
- 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 DataHandler
java.sql.SQLException
public TempFileDeleter getTempFileDeleter()
DataHandler
getTempFileDeleter
in interface DataHandler
public java.lang.String getLobCompressionAlgorithm(int type)
DataHandler
getLobCompressionAlgorithm
in interface DataHandler
type
- the data type (CLOB or BLOB)
public void setCompressionAlgorithm(java.lang.String algorithm)
public java.lang.Object getLobSyncObject()
DataHandler
getLobSyncObject
in interface DataHandler
public boolean getLobFilesInDirectories()
DataHandler
getLobFilesInDirectories
in interface DataHandler
public SmallLRUCache<java.lang.String,java.lang.String[]> getLobFileListCache()
DataHandler
getLobFileListCache
in interface DataHandler
public Trace getTrace()
DataHandler
getTrace
in interface DataHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |