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 that works with Zentus JDBC driver. See
 http://www.zentus.com/sqlitejdbc/ for the driver information. Also look at
 http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC for another adaptor option.
 
 
      sqlite.jdbc.url = jdbc:sqlite:sqlitetest.db
      sqlite.jdbc.driver = org.sqlite.JDBC
 - Since:
- 3.0
- 
Field SummaryFields inherited from class org.apache.cayenne.dba.JdbcAdaptercaseInsensitiveCollations, ejbqlTranslatorFactory, extendedTypes, logger, quotingStrategy, resourceLocator, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler
- 
Constructor SummaryConstructorsConstructorDescriptionSQLiteAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry) 
- 
Method SummaryModifier 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.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.JdbcAdapterbindParameter, buildAttribute, createEJBQLTranslatorFactory, createQuotingStrategy, createTable, dropTableStatements, externalTypesForJdbcType, findResource, getBatchTerminator, getEjbqlTranslatorFactory, getExtendedTypes, getJdbcEventLogger, getPkGenerator, getQuotingStrategy, getSelectTranslator, getSystemCatalogs, getSystemSchemas, getType, initExtendedTypes, setEjbqlTranslatorFactory, setPkGenerator, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, typeSupportsLength, typeSupportsScale, unwrapMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cayenne.dba.DbAdaptersupportsGeneratedKeysForBatchInserts
- 
Constructor Details- 
SQLiteAdapterpublic SQLiteAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry) 
 
- 
- 
Method Details- 
configureExtendedTypesDescription 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 class- JdbcAdapter
 
- 
getSqlTreeProcessor- Specified by:
- getSqlTreeProcessorin interface- DbAdapter
- Overrides:
- getSqlTreeProcessorin class- JdbcAdapter
- Returns:
- SQLTreeProcessorthat can adjust SQL tree to specific database flavour
- Since:
- 4.2
 
- 
createFkConstraintDescription copied from class:JdbcAdapterReturns a SQL string that can be used to create a foreign key constraint for the relationship.- Specified by:
- createFkConstraintin interface- DbAdapter
- Overrides:
- createFkConstraintin class- JdbcAdapter
 
- 
createUniqueConstraintDescription copied from class:JdbcAdapterReturns a DDL string to create a unique constraint over a set of columns.- Specified by:
- createUniqueConstraintin interface- DbAdapter
- Overrides:
- createUniqueConstraintin class- JdbcAdapter
 
- 
getActionDescription copied from class:JdbcAdapterUses JdbcActionBuilder to create the right action.- Specified by:
- getActionin interface- DbAdapter
- Overrides:
- getActionin class- JdbcAdapter
 
- 
createTableAppendColumnAppends AUTOINCREMENT clause to the column definition for generated columns.- Specified by:
- createTableAppendColumnin interface- DbAdapter
- Overrides:
- createTableAppendColumnin class- JdbcAdapter
- Parameters:
- sqlBuffer- the- StringBufferto append the column type to
- column- the- DbAttributedefining the column to append type for
 
- 
createTableAppendPKClause- Overrides:
- createTableAppendPKClausein class- JdbcAdapter
 
 
-