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
- public class MYSQLAdapter
- extends DBAdapter
A DB adapter
for MySQL databases.
- Since:
- 2.0
Methods inherited from class org.eclipse.net4j.spi.db.DBAdapter |
adaptType, appendFieldNames, createConstraints, createFieldDefinition, createIndex, createTable, createTables, doCreateTable, dropTable, dropTables, getDropTableSQL, getName, getSQL92ReservedWords, getVersion, isReservedWord, isValidFirstChar, toString, validateTable |
NAME
public static final String NAME
- See Also:
- Constant Field Values
VERSION
public static final String VERSION
- See Also:
- Constant Field Values
MYSQLAdapter
public MYSQLAdapter()
getJDBCDriver
public com.mysql.jdbc.Driver getJDBCDriver()
createJDBCDataSource
public DataSource createJDBCDataSource()
getMaxTableNameLength
public int getMaxTableNameLength()
- Specified by:
getMaxTableNameLength
in interface IDBAdapter
- Overrides:
getMaxTableNameLength
in class DBAdapter
- Since:
- 2.0
getMaxFieldNameLength
public int getMaxFieldNameLength()
- Specified by:
getMaxFieldNameLength
in interface IDBAdapter
- Overrides:
getMaxFieldNameLength
in class DBAdapter
- Since:
- 2.0
getTypeName
protected String getTypeName(IDBField field)
- Overrides:
getTypeName
in class DBAdapter
addIndexField
protected void addIndexField(StringBuilder builder,
IDBField field)
- Overrides:
addIndexField
in class DBAdapter
getReservedWords
public String[] getReservedWords()
isTypeIndexable
public boolean isTypeIndexable(DBType type)
- Specified by:
isTypeIndexable
in interface IDBAdapter
- Overrides:
isTypeIndexable
in class DBAdapter
isDuplicateKeyException
public boolean isDuplicateKeyException(SQLException ex)
- Description copied from interface:
IDBAdapter
- Check if an exception indicates a constraint violation (duplicate key)
- Specified by:
isDuplicateKeyException
in interface IDBAdapter
- Overrides:
isDuplicateKeyException
in class DBAdapter
Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.