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,IDBAdapterID
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, DBAdapter.IndexInfoNested classes/interfaces inherited from interface org.eclipse.net4j.db.IDBAdapter
IDBAdapter.Registry -
Field Summary
FieldsFields inherited from interface org.eclipse.net4j.db.IDBAdapter
REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddIndexField(StringBuilder builder, IDBField field) protected voiddropPrimaryKey(IDBIndex index, StringBuilder builder) String[]Returns the JDBC database product names recognized by this adapter.protected StringReturns MySQL's backtick identifier delimiter.intintString[]protected StringgetTypeName(IDBField field) booleanCheck if an exception indicates a constraint violation (duplicate key)booleanisTypeIndexable(DBType type) modifyConnection(Connection connection) protected Stringprotected StringsqlModifyField(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, bindParameter, bindParameterBigDecimal, bindParameterBoolean, bindParameterByte, bindParameterBytes, bindParameterDouble, bindParameterFloat, bindParameterInt, bindParameterLong, bindParameterNull, bindParameterObject, bindParameterShort, bindParameterString, convertString, convertString, convertString, convertToSQL, createConnectionProvider, createConstraints, createField, createField, createFieldDefinition, createFieldDefinitions, createIndex, createIndex, createIndex, createIndexFields, createJDBCDataSource, createPrimaryKey, createSchema, createTable, createTable, createTables, doCreateTable, dropField, dropField, dropIndex, dropIndex, dropTable, dropTable, dropTables, equals, escapeQuote, forEachTable, format, format, generateReservedWords, getDefaultDBLength, getDefaultSchemaName, getDropTableSQL, getFieldLength, getIndexInfos, getJDBCDriver, getJDBCTypeForNull, getName, getNullableConstraint, getSQL92ReservedWords, getVersion, hashCode, isCaseSensitive, isColumnNotFoundException, isDuplicateKeyTransactionAbort, isPrimaryKeyShadow, isReservedWord, isTableNotFoundException, isValidFirstChar, openSchemaTransaction, quoteIdentifier, readFields, readIndices, readIndices, readSchema, readSchema, readTables, sqlCharIndex, sqlConcat, sqlModifyField, sqlSubstring, sqlSubstring, sqlSubstringFunction, toString, updateSchema, useJavaTypeForUnknownParameterType, validateTableMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.net4j.db.IDBAdapter
getDatabaseDriverNamePattern, getDatabaseProductNamePattern, getDatabaseURLPattern, quoteTableName, validateSQLLiteral
-
Field Details
-
NAME
- See Also:
-
VERSION
- See Also:
-
-
Constructor Details
-
MYSQLAdapter
public MYSQLAdapter() -
MYSQLAdapter
- Since:
- 4.4
-
-
Method Details
-
getDatabaseProductNames
Description copied from interface:IDBAdapterReturns the JDBC database product names recognized by this adapter. Product names are trimmed and compared case-insensitively. The default recognizes the adapter's declared name. Implementations may return additional aliases.- Returns:
- the exact JDBC product names recognized by this adapter
-
getMaxTableNameLength
public int getMaxTableNameLength()- Specified by:
getMaxTableNameLengthin interfaceIDBAdapter- Overrides:
getMaxTableNameLengthin classDBAdapter- Since:
- 2.0
-
getMaxFieldNameLength
public int getMaxFieldNameLength()- Specified by:
getMaxFieldNameLengthin interfaceIDBAdapter- Overrides:
getMaxFieldNameLengthin classDBAdapter- Since:
- 2.0
-
getTypeName
- Overrides:
getTypeNamein classDBAdapter
-
dropPrimaryKey
- Overrides:
dropPrimaryKeyin classDBAdapter
-
addIndexField
- Overrides:
addIndexFieldin classDBAdapter
-
getReservedWords
-
isTypeIndexable
- Specified by:
isTypeIndexablein interfaceIDBAdapter- Overrides:
isTypeIndexablein classDBAdapter
-
isDuplicateKeyException
Description copied from interface:IDBAdapterCheck if an exception indicates a constraint violation (duplicate key)- Specified by:
isDuplicateKeyExceptionin interfaceIDBAdapter- Overrides:
isDuplicateKeyExceptionin classDBAdapter
-
getIdentifierQuote
Returns MySQL's backtick identifier delimiter.- Overrides:
getIdentifierQuotein classDBAdapter- Returns:
- the backtick delimiter
- Since:
- 4.5
-
sqlRenameField
- Specified by:
sqlRenameFieldin interfaceIDBAdapter- Overrides:
sqlRenameFieldin classDBAdapter
-
sqlModifyField
- Overrides:
sqlModifyFieldin classDBAdapter
-
sqlCharIndexFunction
- Overrides:
sqlCharIndexFunctionin classDBAdapter
-
modifyConnection
- Specified by:
modifyConnectionin interfaceIDBAdapter- Overrides:
modifyConnectionin classDBAdapter
-