public class MYSQLAdapter extends DBAdapter
DB adapter
for MySQL databases.DBAdapter.FieldInfo
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
static String |
VERSION |
REGISTRY
Constructor and Description |
---|
MYSQLAdapter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addIndexField(StringBuilder builder,
IDBField field) |
protected void |
dropPrimaryKey(IDBIndex index,
StringBuilder builder) |
int |
getMaxFieldNameLength() |
int |
getMaxTableNameLength() |
String[] |
getReservedWords() |
protected String |
getTypeName(IDBField field) |
boolean |
isDuplicateKeyException(SQLException ex)
Check if an exception indicates a constraint violation (duplicate key)
|
boolean |
isTypeIndexable(DBType type) |
Connection |
modifyConnection(Connection connection) |
protected String |
sqlModifyField(String tableName,
String fieldName,
String definition) |
String |
sqlRenameField(IDBField field,
String oldName) |
adaptType, addIndex, alterTable, appendFieldDefs, appendFieldNames, convertString, convertString, convertString, createConnectionProvider, createConstraints, createFieldDefinition, createFieldDefinitions, createIndex, createIndex, createIndex, createIndexFields, createJDBCDataSource, createPrimaryKey, createTable, createTable, createTables, doCreateTable, 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 String NAME
public static final 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 String getTypeName(IDBField field)
getTypeName
in class DBAdapter
protected void dropPrimaryKey(IDBIndex index, StringBuilder builder)
dropPrimaryKey
in class DBAdapter
protected void addIndexField(StringBuilder builder, IDBField field)
addIndexField
in class DBAdapter
public String[] getReservedWords()
public boolean isTypeIndexable(DBType type)
isTypeIndexable
in interface IDBAdapter
isTypeIndexable
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
protected String sqlModifyField(String tableName, String fieldName, String definition)
sqlModifyField
in class DBAdapter
public Connection modifyConnection(Connection connection)
modifyConnection
in interface IDBAdapter
modifyConnection
in class DBAdapter
Copyright (c) 2011-2015 Eike Stepper (Berlin, Germany) and others.