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
- public class H2Adapter
- extends DBAdapter
A DB adapter
for H2 databases.
- Since:
- 2.0
Methods inherited from class org.eclipse.net4j.spi.db.DBAdapter |
adaptType, addIndex, addIndexField, alterTable, appendFieldDefs, appendFieldNames, createConstraints, createFieldDefinition, createFieldDefinitions, createIndex, createIndex, createIndex, createIndexFields, createJDBCDataSource, createPrimaryKey, createTable, createTable, createTables, doCreateTable, dropIndex, dropIndex, dropPrimaryKey, dropTable, dropTable, dropTables, format, format, getDefaultDBLength, getDropTableSQL, getFieldLength, getJDBCDriver, getMaxFieldNameLength, getMaxTableNameLength, getName, getSQL92ReservedWords, getVersion, isColumnNotFoundException, isReservedWord, isTableNotFoundException, isTypeIndexable, isValidFirstChar, readFields, readIndices, readIndices, readSchema, readSchema, sqlModifyField, sqlModifyField, toString, updateSchema, validateTable |
VERSION
public static final String VERSION
- See Also:
- Constant Field Values
H2Adapter
public H2Adapter()
getTypeName
protected String getTypeName(IDBField field)
- Overrides:
getTypeName
in class DBAdapter
getReservedWords
public String[] getReservedWords()
isPrimaryKeyShadow
protected boolean isPrimaryKeyShadow(Connection connection,
IDBTable table,
String name,
IDBIndex.Type type,
IDBField[] fields)
- Overrides:
isPrimaryKeyShadow
in class DBAdapter
isDuplicateKeyException
public boolean isDuplicateKeyException(SQLException ex)
- Description copied from interface:
IDBAdapter
- Check if an exception indicates a constraint violation (duplicate key)
- Specified by:
isDuplicateKeyException
in interface IDBAdapter
- Overrides:
isDuplicateKeyException
in class DBAdapter
sqlRenameField
public String sqlRenameField(IDBField field,
String oldName)
- Specified by:
sqlRenameField
in interface IDBAdapter
- Overrides:
sqlRenameField
in class DBAdapter
createSchema
public static void createSchema(DataSource dataSource,
String name,
boolean dropIfExists)
- Since:
- 4.2
Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.