Package org.eclipse.net4j.db.h2
Class H2Adapter
java.lang.Object
org.eclipse.net4j.spi.db.DBAdapter
org.eclipse.net4j.db.h2.H2Adapter
- All Implemented Interfaces:
IDBAdapter
A
DB adapter
for H2 databases.- Since:
- 2.0
- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.net4j.spi.db.DBAdapter
DBAdapter.FieldInfo
-
Field Summary
Fields inherited from interface org.eclipse.net4j.db.IDBAdapter
REGISTRY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createSchema
(DataSource dataSource, String name, boolean dropIfExists) getDefaultSchemaName
(Connection connection) String[]
protected String
getTypeName
(IDBField field) boolean
Check if an exception indicates a constraint violation (duplicate key)protected boolean
isPrimaryKeyShadow
(Connection connection, IDBTable table, String name, IDBIndex.Type type, IDBField[] fields) boolean
static void
shutdown
(DataSource dataSource) sqlRenameField
(IDBField field, String oldName) Methods inherited from class org.eclipse.net4j.spi.db.DBAdapter
adaptType, addIndex, addIndexField, alterTable, appendFieldDefs, appendFieldNames, convertString, convertString, convertString, convertToSQL, createConnectionProvider, createConstraints, createField, createFieldDefinition, createFieldDefinitions, createIndex, createIndex, createIndex, createIndexFields, createJDBCDataSource, createPrimaryKey, createSchema, createTable, createTable, createTables, doCreateTable, dropField, dropIndex, dropIndex, dropPrimaryKey, dropTable, dropTable, dropTables, format, format, generateReservedWords, getDefaultDBLength, getDropTableSQL, getFieldLength, getJDBCDriver, getMaxFieldNameLength, getMaxTableNameLength, getName, getNullableConstraint, getSQL92ReservedWords, getVersion, isCaseSensitive, isColumnNotFoundException, isReservedWord, isTypeIndexable, isValidFirstChar, modifyConnection, openSchemaTransaction, readFields, readIndices, readIndices, readSchema, readSchema, readTables, sqlModifyField, sqlModifyField, toString, updateSchema, validateTable
-
Field Details
-
VERSION
-
-
Constructor Details
-
H2Adapter
public H2Adapter() -
H2Adapter
- Since:
- 4.5
-
-
Method Details
-
getTypeName
- Overrides:
getTypeName
in classDBAdapter
-
getDefaultSchemaName
- Specified by:
getDefaultSchemaName
in interfaceIDBAdapter
- Overrides:
getDefaultSchemaName
in classDBAdapter
-
getReservedWords
-
isPrimaryKeyShadow
protected boolean isPrimaryKeyShadow(Connection connection, IDBTable table, String name, IDBIndex.Type type, IDBField[] fields) - Overrides:
isPrimaryKeyShadow
in classDBAdapter
-
isDuplicateKeyException
Description copied from interface:IDBAdapter
Check if an exception indicates a constraint violation (duplicate key)- Specified by:
isDuplicateKeyException
in interfaceIDBAdapter
- Overrides:
isDuplicateKeyException
in classDBAdapter
-
isTableNotFoundException
- Specified by:
isTableNotFoundException
in interfaceIDBAdapter
- Overrides:
isTableNotFoundException
in classDBAdapter
-
sqlRenameField
- Specified by:
sqlRenameField
in interfaceIDBAdapter
- Overrides:
sqlRenameField
in classDBAdapter
-
createSchema
- Since:
- 4.2
-
shutdown
- Since:
- 4.3
-