public class SQLiteAdapter extends JdbcAdapter
sqlite.jdbc.url = jdbc:sqlite:sqlitetest.db sqlite.jdbc.driver = org.sqlite.JDBC
batchQueryBuilderFactory, caseInsensitiveCollations, ejbqlTranslatorFactory, extendedTypes, logger, quotingStrategy, resourceLocator, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler
Constructor and Description |
---|
SQLiteAdapter(RuntimeProperties runtimeProperties,
List<ExtendedType> defaultExtendedTypes,
List<ExtendedType> userExtendedTypes,
List<ExtendedTypeFactory> extendedTypeFactories,
ResourceLocator resourceLocator) |
Modifier and Type | Method and Description |
---|---|
void |
bindParameter(PreparedStatement statement,
Object object,
int pos,
int sqlType,
int scale)
Binds an object value to PreparedStatement's numbered parameter.
|
protected void |
configureExtendedTypes(ExtendedTypeMap map)
Called from
JdbcAdapter.initExtendedTypes(List, List, List) to load
adapter-specific types into the ExtendedTypeMap right after the default
types are loaded, but before the DI overrides are. |
String |
createFkConstraint(DbRelationship rel)
Returns a SQL string that can be used to create a foreign key constraint
for the relationship.
|
void |
createTableAppendColumn(StringBuffer sqlBuffer,
DbAttribute column)
Appends AUTOINCREMENT clause to the column definition for generated columns.
|
protected void |
createTableAppendPKClause(StringBuffer sqlBuffer,
DbEntity entity) |
String |
createUniqueConstraint(DbEntity source,
Collection<DbAttribute> columns)
Returns a DDL string to create a unique constraint over a set of columns.
|
SQLAction |
getAction(Query query,
DataNode node)
Uses JdbcActionBuilder to create the right action.
|
buildAttribute, createEJBQLTranslatorFactory, createPkGenerator, createQuotingStrategy, createTable, dropTableStatements, externalTypesForJdbcType, findResource, getBatchQueryBuilderFactory, getBatchTerminator, getEjbqlTranslatorFactory, getExtendedTypes, getJdbcEventLogger, getPkGenerator, getQualifierTranslator, getQuotingStrategy, getQuotingStrategy, getType, initExtendedTypes, mergerFactory, setBatchQueryBuilderFactory, setEjbqlTranslatorFactory, setPkGenerator, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, typeSupportsLength, unwrap
public SQLiteAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator)
protected void configureExtendedTypes(ExtendedTypeMap map)
JdbcAdapter
JdbcAdapter.initExtendedTypes(List, List, List)
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.configureExtendedTypes
in class JdbcAdapter
public String createFkConstraint(DbRelationship rel)
JdbcAdapter
createFkConstraint
in interface DbAdapter
createFkConstraint
in class JdbcAdapter
public String createUniqueConstraint(DbEntity source, Collection<DbAttribute> columns)
JdbcAdapter
createUniqueConstraint
in interface DbAdapter
createUniqueConstraint
in class JdbcAdapter
public SQLAction getAction(Query query, DataNode node)
JdbcAdapter
getAction
in interface DbAdapter
getAction
in class JdbcAdapter
public void bindParameter(PreparedStatement statement, Object object, int pos, int sqlType, int scale) throws SQLException, Exception
DbAdapter
bindParameter
in interface DbAdapter
bindParameter
in class JdbcAdapter
SQLException
Exception
public void createTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column)
createTableAppendColumn
in interface DbAdapter
createTableAppendColumn
in class JdbcAdapter
sqlBuffer
- the StringBuffer
to append the column type tocolumn
- the DbAttribute
defining the column to append type forprotected void createTableAppendPKClause(StringBuffer sqlBuffer, DbEntity entity)
createTableAppendPKClause
in class JdbcAdapter
Copyright © 2001–2015 Apache Cayenne. All rights reserved.