public class DBMSHandlerSQLite extends DBMSHandlerBase
| Modifier and Type | Class and Description |
|---|---|
static class |
DBMSHandlerSQLite.DBCommandSQLite
Defines the SQLite command type.
|
DBMSHandlerBase.DBMSCommand, DBMSHandlerBase.DBSeqTableDBMSHandler.DBSetGenKeysGENERAL_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, stringToBooleanpublic DBMSHandlerSQLite()
public DBCommand createCommand(boolean autoPrepareStmt)
createCommand in interface DBMSHandlercreateCommand in class DBMSHandlerBaseautoPrepareStmt - whether or not the Command should automatically generate a prepared statement (using ?)public boolean isSupported(DBMSFeature type)
isSupported in interface DBMSHandlerisSupported in class DBMSHandlerBasetype - 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)
DBMSHandlerdestType - 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 DBMSHandlerexecuteSQL in class DBMSHandlerBasesqlCmd - 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 DBMSHandlergetResultValue in class DBMSHandlerBaserset - 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 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)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 connectionpublic DBColumnExpr getNextSequenceValueExpr(DBTableColumn column)
DBMSHandlerBasegetNextSequenceValueExpr in class DBMSHandlerBaseDBMSHandler#getNextSequenceValueExpr(DBTableColumn col)Copyright © 2008–2022 Apache Software Foundation. All rights reserved.