public class MySQLDatabaseDialect extends BasicDatabaseDialect
DEFAULT_MAX_CONSTRAINT_NAME_LENGTH, KEY_CURRENT, KEY_TARGET
Constructor and Description |
---|
MySQLDatabaseDialect() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
areTypesEqual(int type,
int other) |
String |
generateAddColumn(Table table,
TableColumn col)
Generates an alter statement to add the given column.
|
List<String> |
generateAlterColumnTo(Table table,
String oldName,
TableColumn toColumn)
Alters the given column.
|
String |
generateCreateTable(Table table)
Builds a CREATE TABLE statement.
|
protected int |
getConstraintCharacterLimit()
Determines the length a constraint should have.
|
protected String |
getTypeName(TableColumn column) |
boolean |
isColumnCaseSensitive()
Determines whether casing of columns should be fixed.
|
boolean |
shouldDropKey(Table targetTable,
Table currentTable,
Key key)
Determines if the given key should be dropped.
|
areColumnsEqual, areDefaultsDifferent, checkColumnSettings, checkForEquality, completeTableInfos, ensurePositiveLength, equalValue, generateAddForeignKey, generateAddKey, generateAlterForeignKey, generateAlterKey, generateAlterPrimaryKey, generateDropColumn, generateDropForeignKey, generateDropKey, generateDropTable, getDefaultValueAsString, getEffectiveKeyName, getEngine, getJDBCType, hasEscapedDefaultValue, in, isNeedsQuotation, resolveType, translateColumnName
protected boolean areTypesEqual(int type, int other)
areTypesEqual
in class BasicDatabaseDialect
protected String getTypeName(TableColumn column)
getTypeName
in class BasicDatabaseDialect
public String generateAddColumn(Table table, TableColumn col)
DatabaseDialect
table
- the table to altercol
- the column to createpublic List<String> generateAlterColumnTo(Table table, String oldName, TableColumn toColumn)
DatabaseDialect
table
- the table to alteroldName
- the old name of the column (if it was renamed)toColumn
- the column as expected in the schemapublic String generateCreateTable(Table table)
DatabaseDialect
table
- the table to createpublic boolean isColumnCaseSensitive()
DatabaseDialect
public boolean shouldDropKey(Table targetTable, Table currentTable, Key key)
DatabaseDialect
targetTable
- the table being referencedcurrentTable
- the table referencing anotherkey
- the key which defines the referenceprotected int getConstraintCharacterLimit()
BasicDatabaseDialect
getConstraintCharacterLimit
in class BasicDatabaseDialect
Copyright © 2018. All rights reserved.