public class DBMSHandlerH2 extends DBMSHandlerBase
| Modifier and Type | Class and Description |
|---|---|
static class |
DBMSHandlerH2.DBCommandH2
Defines the H2 command type.
|
DBMSHandlerBase.DBMSBuilder, DBMSHandlerBase.DBMSCommand, DBMSHandlerBase.DBSeqTableDBMSHandler.DBSetGenKeysGENERAL_SQL_KEYWORDS, ILLEGAL_NAME_CHARS, reservedSQLKeywords, SEQUENCE_NAME_SUFFIX| Constructor and Description |
|---|
DBMSHandlerH2()
Constructor for the H2 database dbms.
|
| Modifier and Type | Method and Description |
|---|---|
DBCommand |
createCommand(boolean autoPrepareStmt)
Creates a new H2 command object.
|
String |
getConvertPhrase(DataType destType,
DataType srcType,
Object format)
Returns a data type convertion phrase template for this dbms
The returned template must contain a '?' |
String |
getDatabaseName()
returns the name for the database / schema
|
void |
getDDLScript(DBDDLGenerator.DDLActionType type,
DBObject dbo,
DBSQLScript script)
Appends the required DLL commands to create, drop or alter an object to the supplied DBDQLScript.
|
Object |
getNextSequenceValue(DBDatabase db,
String seqName,
int minValue,
Connection conn)
Returns the next value of a named sequence The numbers are used for fields of type DBExpr.DT_AUTOINC.
|
DBColumnExpr |
getNextSequenceValueExpr(DBTableColumn column)
Returns an expression for creating a sequence value.
|
String |
getSequenceTableName()
returns the name of the sequence table
|
String |
getSQLPhrase(DBSqlPhrase phrase)
Gets an sql phrase template for this database system.
|
Timestamp |
getUpdateTimestamp(Connection conn)
Overridden.
|
boolean |
isSupported(DBMSFeature type)
Returns whether or not a particular feature is supported by this dmbs
|
boolean |
isUseSequenceTable()
returns whether a sequence table is used for record identiy management.
|
void |
setDatabaseName(String databaseName)
Sets the name for the database / schema
This names is required for creating a database. |
void |
setSequenceTableName(String sequenceTableName)
Sets the name of the sequence table.
|
void |
setUseSequenceTable(boolean useSequenceTable)
If set to true a special table is used for sequence number generation.
|
addStatementParam, appendEnableRelationStmt, appendObjectName, attachDatabase, checkExists, closeResultSet, closeStatement, createCombinedCommand, createModelChecker, createModelParser, createSQLBuilder, detachDatabase, detectQuoteName, executeBatch, executeQuery, executeSQL, extractErrorMessage, getColumnAutoValue, getColumnSequenceName, getResultValue, prepareStatement, querySingleValuepublic String getDatabaseName()
public void setDatabaseName(String databaseName)
databaseName - the name of the databasepublic boolean isUseSequenceTable()
public void setUseSequenceTable(boolean useSequenceTable)
useSequenceTable - true to use a sequence table or false otherwise.public String getSequenceTableName()
public void setSequenceTableName(String sequenceTableName)
sequenceTableName - the name of the table used for sequence number generationpublic DBCommand createCommand(boolean autoPrepareStmt)
createCommand in interface DBMSHandlercreateCommand in class DBMSHandlerBaseautoPrepareStmt - flag whether to automatically provide literal values as prepared statement paramspublic boolean isSupported(DBMSFeature type)
isSupported in interface DBMSHandlerisSupported in class DBMSHandlerBasetype - type of requrested feature. @see DBMSFeaturepublic String getSQLPhrase(DBSqlPhrase phrase)
phrase - the identifier of the phraseDBMSHandler.getSQLPhrase(DBSqlPhrase)public String getConvertPhrase(DataType destType, DataType srcType, Object format)
DBMSHandlerdestType - the target data typesrcType - the source data typeformat - additional formatting information (optional)DBMSHandler.getConvertPhrase(DataType, DataType, Object)public Object getNextSequenceValue(DBDatabase db, String seqName, int minValue, Connection conn)
DBMSHandlerBasegetNextSequenceValue in class DBMSHandlerBasedb - the databaseseqName - the name of the sequenceminValue - the minimum value of the sequenceconn - a valid database connectionDBMSHandlerBase.getNextSequenceValue(DBDatabase, String, int, Connection)public DBColumnExpr getNextSequenceValueExpr(DBTableColumn column)
DBMSHandlerBasegetNextSequenceValueExpr in class DBMSHandlerBasecolumn - the column for which to obtain an expression providing the next sequence valueDBMSHandlerBase.getNextSequenceValueExpr(DBTableColumn col)public Timestamp getUpdateTimestamp(Connection conn)
getUpdateTimestamp in interface DBMSHandlergetUpdateTimestamp in class DBMSHandlerBaseconn - the connection that might be usedpublic void getDDLScript(DBDDLGenerator.DDLActionType type, DBObject dbo, DBSQLScript script)
DBMSHandlertype - operation to perform (CREATE, DROP, ALTER)dbo - the object for which to perform the operation (DBDatabase, DBTable, DBView, DBColumn, DBRelation)script - the script to which to add the DDL command(s)DBMSHandler#getDDLScript(DDLActionType, DBObject, DBSQLScript)Copyright © 2008–2023 Apache Software Foundation. All rights reserved.