Package org.eclipse.net4j.db.mysql
Class MYSQLAdapter
java.lang.Object
org.eclipse.net4j.spi.db.DBAdapter
org.eclipse.net4j.db.mysql.MYSQLAdapter
- All Implemented Interfaces:
IDBAdapter
A
DB adapter
for MySQL 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 TypeMethodDescriptionprotected void
addIndexField
(StringBuilder builder, IDBField field) protected void
dropPrimaryKey
(IDBIndex index, StringBuilder builder) int
int
String[]
protected String
getTypeName
(IDBField field) boolean
Check if an exception indicates a constraint violation (duplicate key)boolean
isTypeIndexable
(DBType type) modifyConnection
(Connection connection) protected String
sqlModifyField
(String tableName, String fieldName, String definition) sqlRenameField
(IDBField field, String oldName) Methods inherited from class org.eclipse.net4j.spi.db.DBAdapter
adaptType, addIndex, 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, dropTable, dropTable, dropTables, format, format, generateReservedWords, getDefaultDBLength, getDefaultSchemaName, getDropTableSQL, getFieldLength, getJDBCDriver, getName, getNullableConstraint, getSQL92ReservedWords, getVersion, isCaseSensitive, isColumnNotFoundException, isPrimaryKeyShadow, isReservedWord, isTableNotFoundException, isValidFirstChar, openSchemaTransaction, readFields, readIndices, readIndices, readSchema, readSchema, readTables, sqlModifyField, toString, updateSchema, validateTable
-
Field Details
-
NAME
- See Also:
-
VERSION
- See Also:
-
-
Constructor Details
-
MYSQLAdapter
public MYSQLAdapter() -
MYSQLAdapter
- Since:
- 4.4
-
-
Method Details
-
getMaxTableNameLength
public int getMaxTableNameLength()- Specified by:
getMaxTableNameLength
in interfaceIDBAdapter
- Overrides:
getMaxTableNameLength
in classDBAdapter
- Since:
- 2.0
-
getMaxFieldNameLength
public int getMaxFieldNameLength()- Specified by:
getMaxFieldNameLength
in interfaceIDBAdapter
- Overrides:
getMaxFieldNameLength
in classDBAdapter
- Since:
- 2.0
-
getTypeName
- Overrides:
getTypeName
in classDBAdapter
-
dropPrimaryKey
- Overrides:
dropPrimaryKey
in classDBAdapter
-
addIndexField
- Overrides:
addIndexField
in classDBAdapter
-
getReservedWords
-
isTypeIndexable
- Specified by:
isTypeIndexable
in interfaceIDBAdapter
- Overrides:
isTypeIndexable
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
-
sqlRenameField
- Specified by:
sqlRenameField
in interfaceIDBAdapter
- Overrides:
sqlRenameField
in classDBAdapter
-
sqlModifyField
- Overrides:
sqlModifyField
in classDBAdapter
-
modifyConnection
- Specified by:
modifyConnection
in interfaceIDBAdapter
- Overrides:
modifyConnection
in classDBAdapter
-