public class DBMSHandlerDerby extends DBMSHandlerBase
DBMSHandlerBase.DBMSBuilder, DBMSHandlerBase.DBMSCommand, DBMSHandlerBase.DBSeqTable
DBMSHandler.DBSetGenKeys
GENERAL_SQL_KEYWORDS, ILLEGAL_NAME_CHARS, reservedSQLKeywords, SEQUENCE_NAME_SUFFIX
Constructor and Description |
---|
DBMSHandlerDerby()
Constructor for the Derby database handler.
|
Modifier and Type | Method and Description |
---|---|
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 dbms
|
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, createCommand, createModelChecker, createModelParser, createSQLBuilder, detachDatabase, detectQuoteName, executeBatch, executeQuery, executeSQL, extractErrorMessage, getColumnAutoValue, getColumnSequenceName, getResultValue, prepareStatement, querySingleValue
public DBMSHandlerDerby()
public 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 boolean isSupported(DBMSFeature type)
isSupported
in interface DBMSHandler
isSupported
in class DBMSHandlerBase
type
- 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)
DBMSHandler
destType
- 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)
DBMSHandlerBase
getNextSequenceValue
in class DBMSHandlerBase
db
- 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)
DBMSHandlerBase
getNextSequenceValueExpr
in class DBMSHandlerBase
column
- the column for which to obtain an expression providing the next sequence valueDBMSHandlerBase.getNextSequenceValueExpr(DBTableColumn col)
public Timestamp getUpdateTimestamp(Connection conn)
getUpdateTimestamp
in interface DBMSHandler
getUpdateTimestamp
in class DBMSHandlerBase
conn
- the connection that might be usedpublic void getDDLScript(DBDDLGenerator.DDLActionType type, DBObject dbo, DBSQLScript script)
DBMSHandler
type
- 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.