public class MYSQLAdapter extends DBAdapter
DB adapter
for MySQL databases.DBAdapter.FieldInfo
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
static java.lang.String |
VERSION |
REGISTRY
Constructor and Description |
---|
MYSQLAdapter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addIndexField(java.lang.StringBuilder builder,
IDBField field) |
protected void |
dropPrimaryKey(IDBIndex index,
java.lang.StringBuilder builder) |
int |
getMaxFieldNameLength() |
int |
getMaxTableNameLength() |
java.lang.String[] |
getReservedWords() |
protected java.lang.String |
getTypeName(IDBField field) |
boolean |
isDuplicateKeyException(java.sql.SQLException ex)
Check if an exception indicates a constraint violation (duplicate key)
|
boolean |
isTypeIndexable(DBType type) |
java.sql.Connection |
modifyConnection(java.sql.Connection connection) |
protected java.lang.String |
sqlModifyField(java.lang.String tableName,
java.lang.String fieldName,
java.lang.String definition) |
java.lang.String |
sqlRenameField(IDBField field,
java.lang.String oldName) |
adaptType, addIndex, alterTable, appendFieldDefs, appendFieldNames, convertString, convertString, convertString, createConnectionProvider, createConstraints, createField, createFieldDefinition, createFieldDefinitions, createIndex, createIndex, createIndex, createIndexFields, createJDBCDataSource, createPrimaryKey, createTable, createTable, createTables, doCreateTable, dropField, dropIndex, dropIndex, dropTable, dropTable, dropTables, format, format, getDefaultDBLength, getDropTableSQL, getFieldLength, getJDBCDriver, getName, getSQL92ReservedWords, getVersion, isColumnNotFoundException, isPrimaryKeyShadow, isReservedWord, isTableNotFoundException, isValidFirstChar, readFields, readIndices, readIndices, readSchema, readSchema, readTables, sqlModifyField, toString, updateSchema, validateTable
public static final java.lang.String NAME
public static final java.lang.String VERSION
public int getMaxTableNameLength()
getMaxTableNameLength
in interface IDBAdapter
getMaxTableNameLength
in class DBAdapter
public int getMaxFieldNameLength()
getMaxFieldNameLength
in interface IDBAdapter
getMaxFieldNameLength
in class DBAdapter
protected java.lang.String getTypeName(IDBField field)
getTypeName
in class DBAdapter
protected void dropPrimaryKey(IDBIndex index, java.lang.StringBuilder builder)
dropPrimaryKey
in class DBAdapter
protected void addIndexField(java.lang.StringBuilder builder, IDBField field)
addIndexField
in class DBAdapter
public java.lang.String[] getReservedWords()
public boolean isTypeIndexable(DBType type)
isTypeIndexable
in interface IDBAdapter
isTypeIndexable
in class DBAdapter
public boolean isDuplicateKeyException(java.sql.SQLException ex)
IDBAdapter
isDuplicateKeyException
in interface IDBAdapter
isDuplicateKeyException
in class DBAdapter
public java.lang.String sqlRenameField(IDBField field, java.lang.String oldName)
sqlRenameField
in interface IDBAdapter
sqlRenameField
in class DBAdapter
protected java.lang.String sqlModifyField(java.lang.String tableName, java.lang.String fieldName, java.lang.String definition)
sqlModifyField
in class DBAdapter
public java.sql.Connection modifyConnection(java.sql.Connection connection)
modifyConnection
in interface IDBAdapter
modifyConnection
in class DBAdapter
Copyright (c) 2004-2019 Eike Stepper (Loehne, 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