Package org.h2.command.dml
Class ScriptCommand
java.lang.Object
org.h2.command.Prepared
org.h2.command.dml.ScriptBase
org.h2.command.dml.ScriptCommand
This class represents the statement
SCRIPT
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]
private static final Comparator
<? super DbObject> private Charset
private boolean
private boolean
private byte[]
private String
private int
private int
private boolean
private LocalResult
private boolean
private boolean
private Collection
<Table> private boolean
private boolean
private boolean
Fields inherited from class org.h2.command.dml.ScriptBase
out, reader
Fields inherited from class org.h2.command.Prepared
create, parameters, prepareAlways, session, sqlStatement, sqlTokens
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
static InputStream
combineBlob
(Connection conn, int id) Combine a BLOB.static Reader
combineClob
(Connection conn, int id) Combine a CLOB.private LocalResult
private void
dumpDomains
(ArrayList<Schema> schemas) private void
dumpRights
(Database db) private boolean
excludeSchema
(Schema schema) private boolean
excludeTable
(Table table) private int
generateInsertValues
(int count, Table table) private static ResultSet
getLobStream
(Connection conn, String column, int id) int
getType()
Get the command type as defined in CommandInterfaceboolean
isQuery()
Check if this object is a query.query
(long maxrows) Execute the query.Get an empty result set containing the meta data.private void
reset()
void
setCharset
(Charset charset) void
setData
(boolean data) void
setDrop
(boolean drop) void
setLobBlockSize
(long blockSize) void
setPasswords
(boolean passwords) void
setSchemaNames
(Set<String> schemaNames) void
setSettings
(boolean settings) void
setSimple
(boolean simple) void
setTables
(Collection<Table> tables) void
setVersion
(boolean version) void
setWithColumns
(boolean withColumns) private static <T extends DbObject>
T[]sorted
(Collection<T> collection, Class<T> clazz) private int
Methods inherited from class org.h2.command.dml.ScriptBase
closeIO, deleteStore, getFileName, isTransactional, needRecompile, openInput, openOutput, setCipher, setCompressionAlgorithm, setFileNameExpr, setPassword
Methods inherited from class org.h2.command.Prepared
checkCanceled, checkParameters, collectDependencies, getCteCleanups, getCurrentRowNumber, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, isCacheable, isReadOnly, prepare, setCommand, setCteCleanups, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, toString, update
-
Field Details
-
BY_NAME_COMPARATOR
-
charset
-
schemaNames
-
tables
-
passwords
private boolean passwords -
data
private boolean data -
settings
private boolean settings -
drop
private boolean drop -
simple
private boolean simple -
withColumns
private boolean withColumns -
version
private boolean version -
result
-
lineSeparatorString
-
lineSeparator
private byte[] lineSeparator -
buffer
private byte[] buffer -
tempLobTableCreated
private boolean tempLobTableCreated -
nextLobId
private int nextLobId -
lobBlockSize
private int lobBlockSize
-
-
Constructor Details
-
ScriptCommand
-
-
Method Details
-
isQuery
public boolean isQuery()Description copied from class:Prepared
Check if this object is a query. -
setSchemaNames
-
setTables
-
setData
public void setData(boolean data) -
setPasswords
public void setPasswords(boolean passwords) -
setSettings
public void setSettings(boolean settings) -
setLobBlockSize
public void setLobBlockSize(long blockSize) -
setDrop
public void setDrop(boolean drop) -
queryMeta
Description copied from class:Prepared
Get an empty result set containing the meta data. -
createResult
-
query
Description copied from class:Prepared
Execute the query. -
dumpDomains
- Throws:
IOException
-
dumpRights
- Throws:
IOException
-
addDomain
- Throws:
IOException
-
sorted
-
generateInsertValues
- Throws:
IOException
-
writeLobStream
- Throws:
IOException
-
combineBlob
Combine a BLOB. This method is called from the script. When calling with id -1, the file is deleted.- Parameters:
conn
- a connectionid
- the lob id- Returns:
- a stream for the combined data
- Throws:
SQLException
- on failure
-
combineClob
Combine a CLOB. This method is called from the script.- Parameters:
conn
- a connectionid
- the lob id- Returns:
- a reader for the combined data
- Throws:
SQLException
- on failure
-
getLobStream
- Throws:
SQLException
-
reset
private void reset() -
excludeSchema
-
excludeTable
-
add
- Throws:
IOException
-
setSimple
public void setSimple(boolean simple) -
setWithColumns
public void setWithColumns(boolean withColumns) -
setVersion
public void setVersion(boolean version) -
setCharset
-
getType
public int getType()Description copied from class:Prepared
Get the command type as defined in CommandInterface
-