public class H2Adapter extends DBAdapter
DB adapter
for H2 databases.DBAdapter.FieldInfo
Modifier and Type | Field and Description |
---|---|
static String |
VERSION |
REGISTRY
Constructor and Description |
---|
H2Adapter() |
Modifier and Type | Method and Description |
---|---|
static void |
createSchema(DataSource dataSource,
String name,
boolean dropIfExists) |
String[] |
getReservedWords() |
protected String |
getTypeName(IDBField field) |
boolean |
isDuplicateKeyException(SQLException ex)
Check if an exception indicates a constraint violation (duplicate key)
|
protected boolean |
isPrimaryKeyShadow(Connection connection,
IDBTable table,
String name,
IDBIndex.Type type,
IDBField[] fields) |
static void |
shutdown(DataSource dataSource) |
String |
sqlRenameField(IDBField field,
String oldName) |
adaptType, addIndex, addIndexField, alterTable, appendFieldDefs, appendFieldNames, convertString, convertString, convertString, createConnectionProvider, createConstraints, createField, createFieldDefinition, createFieldDefinitions, createIndex, createIndex, createIndex, createIndexFields, createJDBCDataSource, createPrimaryKey, createTable, createTable, createTables, doCreateTable, dropField, dropIndex, dropIndex, dropPrimaryKey, dropTable, dropTable, dropTables, format, format, getDefaultDBLength, getDropTableSQL, getFieldLength, getJDBCDriver, getMaxFieldNameLength, getMaxTableNameLength, getName, getSQL92ReservedWords, getVersion, isColumnNotFoundException, isReservedWord, isTableNotFoundException, isTypeIndexable, isValidFirstChar, modifyConnection, readFields, readIndices, readIndices, readSchema, readSchema, readTables, sqlModifyField, sqlModifyField, toString, updateSchema, validateTable
public static final String VERSION
protected String getTypeName(IDBField field)
getTypeName
in class DBAdapter
public String[] getReservedWords()
protected boolean isPrimaryKeyShadow(Connection connection, IDBTable table, String name, IDBIndex.Type type, IDBField[] fields)
isPrimaryKeyShadow
in class DBAdapter
public boolean isDuplicateKeyException(SQLException ex)
IDBAdapter
isDuplicateKeyException
in interface IDBAdapter
isDuplicateKeyException
in class DBAdapter
public String sqlRenameField(IDBField field, String oldName)
sqlRenameField
in interface IDBAdapter
sqlRenameField
in class DBAdapter
public static void createSchema(DataSource dataSource, String name, boolean dropIfExists)
public static void shutdown(DataSource dataSource)
Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html