public class DBMSHandlerSQLite extends DBMSHandlerBase
Modifier and Type | Class and Description |
---|---|
static class |
DBMSHandlerSQLite.DBCommandSQLite
Defines the SQLite command type.
|
DBMSHandlerBase.DBMSCommand, DBMSHandlerBase.DBSeqTable
DBMSHandler.DBSetGenKeys
GENERAL_SQL_KEYWORDS, ILLEGAL_NAME_CHARS, reservedSQLKeywords, SEQUENCE_NAME_SUFFIX
Constructor and Description |
---|
DBMSHandlerSQLite()
Constructor for the SQLite database dbms.
|
Modifier and Type | Method and Description |
---|---|
DBCommand |
createCommand(boolean autoPrepareStmt)
Creates a new SQLite command object.
|
int |
executeSQL(String sqlCmd,
Object[] sqlParams,
Connection conn,
DBMSHandler.DBSetGenKeys genKeys)
Override since
conn.prepareStatement(sqlCmd, Statement.RETURN_GENERATED_KEYS)
is not supported by SQLLite dbms
|
String |
getConvertPhrase(DataType destType,
DataType srcType,
Object format)
Returns a data type convertion phrase template for this dbms
The returned template must contain a '?' |
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.
|
Object |
getResultValue(ResultSet rset,
int columnIndex,
DataType dataType)
Reads a single column value from the given JDBC ResultSet and returns a value object of desired data type.
|
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
|
addStatementParam, appendEnableRelationStmt, appendObjectName, appendSQLTextValue, attachDatabase, checkExists, closeResultSet, closeStatement, createCombinedCommand, createModelChecker, createModelParser, detachDatabase, detectQuoteName, executeBatch, executeQuery, extractErrorMessage, getColumnAutoValue, getColumnSequenceName, getSQLDateTimeString, getSQLNumberString, getSQLTextString, getValueString, prepareStatement, querySingleValue, stringToBoolean
public DBMSHandlerSQLite()
public DBCommand createCommand(boolean autoPrepareStmt)
createCommand
in interface DBMSHandler
createCommand
in class DBMSHandlerBase
autoPrepareStmt
- whether or not the Command should automatically generate a prepared statement (using ?)public boolean isSupported(DBMSFeature type)
isSupported
in interface DBMSHandler
isSupported
in class DBMSHandlerBase
type
- type of requested feature. @see DBMSFeaturepublic String getSQLPhrase(DBSqlPhrase phrase)
phrase
- the identifier of the phraseDBMSHandler#getSQLPhrase(int)
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 int executeSQL(String sqlCmd, Object[] sqlParams, Connection conn, DBMSHandler.DBSetGenKeys genKeys) throws SQLException
executeSQL
in interface DBMSHandler
executeSQL
in class DBMSHandlerBase
sqlCmd
- the SQL-CommandsqlParams
- array of sql command parameters used for prepared statements (Optional).conn
- a valid connection to the database.genKeys
- allows to set the auto generated key of a record (INSERT statements only)SQLException
- if a database access error occurspublic Object getResultValue(ResultSet rset, int columnIndex, DataType dataType) throws SQLException
DBMSHandlerBase
Reads a single column value from the given JDBC ResultSet and returns a value object of desired data type.
See DBExpr#getValueClass(DataType)
for java class type mapping.
This gives the dbms the opportunity to change the value i.e. to simulate missing data types with other types.
getResultValue
in interface DBMSHandler
getResultValue
in class DBMSHandlerBase
rset
- the sql Resultset with the current data rowcolumnIndex
- one based column Index of the desired columndataType
- the required data typeSQLException
- if a database access error occurspublic 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)
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 connectionpublic DBColumnExpr getNextSequenceValueExpr(DBTableColumn column)
DBMSHandlerBase
getNextSequenceValueExpr
in class DBMSHandlerBase
DBMSHandler#getNextSequenceValueExpr(DBTableColumn col)
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.