Package org.apache.cayenne.dba.sqlite
Class SQLiteAdapter
java.lang.Object
org.apache.cayenne.dba.JdbcAdapter
org.apache.cayenne.dba.sqlite.SQLiteAdapter
- All Implemented Interfaces:
DbAdapter
A SQLite database adapter.
- Since:
- 3.0
-
Field Summary
Fields inherited from class org.apache.cayenne.dba.JdbcAdapter
caseInsensitiveCollations, defaultCharColumnLength, ejbqlTranslator, extendedTypes, logger, nativeColumnTypes, quotingStrategy, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints -
Constructor Summary
ConstructorsConstructorDescriptionSQLiteAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ValueObjectTypeRegistry valueObjectTypeRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalled fromJdbcAdapter.initExtendedTypes(List, List, List, ValueObjectTypeRegistry)to load adapter-specific types into the ExtendedTypeMap right after the default types are loaded, but before the DI overrides are.Returns a SQL string that can be used to create a foreign key constraint for the relationship.protected NativeColumnType[]Returns the database-native types supported by this adapter.voidcreateTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column) Appends AUTOINCREMENT clause to the column definition for generated columns.protected voidcreateTableAppendPKClause(StringBuffer sqlBuffer, DbEntity entity) createUniqueConstraint(DbEntity source, Collection<DbAttribute> columns) Returns a DDL string to create a unique constraint over a set of columns.Uses JdbcActionBuilder to create the right action.Methods inherited from class org.apache.cayenne.dba.JdbcAdapter
bind, bindParameter, bindParameter, buildAttribute, createEJBQLTranslator, createPkGenerator, createQuotingStrategy, createTable, defaultCharColumnLength, dropTableStatements, externalTypesForJdbcType, getBatchTerminator, getEjbqlTranslator, getExtendedTypes, getProcedureTranslator, getQuotingStrategy, getQuotingStrategy, getSelectTranslator, getSQLLogger, getSystemCatalogs, getSystemSchemas, getType, initExtendedTypes, nativeColumnTypes, setEjbqlTranslator, setEjbqlTranslatorFactory, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, sizeAndScale, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, typeSupportsLength, typeSupportsScale, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cayenne.dba.DbAdapter
getEjbqlTranslatorFactory, preferredBindingType, preferredNativeColumnType, supportsGeneratedKeysForBatchInserts
-
Constructor Details
-
SQLiteAdapter
public SQLiteAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ValueObjectTypeRegistry valueObjectTypeRegistry)
-
-
Method Details
-
createNativeTypes
Description copied from class:JdbcAdapterReturns the database-native types supported by this adapter.- Overrides:
createNativeTypesin classJdbcAdapter
-
configureExtendedTypes
Description copied from class:JdbcAdapterCalled fromJdbcAdapter.initExtendedTypes(List, List, List, ValueObjectTypeRegistry)to load adapter-specific types into the ExtendedTypeMap right after the default types are loaded, but before the DI overrides are. This method has specific implementations in JdbcAdapter subclasses.- Overrides:
configureExtendedTypesin classJdbcAdapter
-
getSqlTreeProcessor
- Specified by:
getSqlTreeProcessorin interfaceDbAdapter- Overrides:
getSqlTreeProcessorin classJdbcAdapter- Returns:
SQLTreeProcessorthat can adjust SQL tree to specific database flavour- Since:
- 4.2
-
createFkConstraint
Description copied from class:JdbcAdapterReturns a SQL string that can be used to create a foreign key constraint for the relationship.- Specified by:
createFkConstraintin interfaceDbAdapter- Overrides:
createFkConstraintin classJdbcAdapter
-
createUniqueConstraint
Description copied from class:JdbcAdapterReturns a DDL string to create a unique constraint over a set of columns.- Specified by:
createUniqueConstraintin interfaceDbAdapter- Overrides:
createUniqueConstraintin classJdbcAdapter
-
getAction
Description copied from class:JdbcAdapterUses JdbcActionBuilder to create the right action.- Specified by:
getActionin interfaceDbAdapter- Overrides:
getActionin classJdbcAdapter
-
createTableAppendColumn
Appends AUTOINCREMENT clause to the column definition for generated columns.- Specified by:
createTableAppendColumnin interfaceDbAdapter- Overrides:
createTableAppendColumnin classJdbcAdapter- Parameters:
sqlBuffer- theStringBufferto append the column type tocolumn- theDbAttributedefining the column to append type for
-
createTableAppendPKClause
- Overrides:
createTableAppendPKClausein classJdbcAdapter
-