public class MySqlDbSupport extends DbSupport
DbSupport for a MySql database.
Note: by default MySql uses '`' (back-quote) for quoting identifiers. '"' (double quotes) is only supported in MySql
if ANSI_QUOTES sql mode is enabled. Quoting identifiers does not make them case-sensitive. Case-sensitivity is
platform dependent. E.g. on UNIX systems identifiers will typically be case-sensitive, on Windows platforms they
will be converted to lower-case.
Trigger names are an exception to this: they are always case-sensitive.PROPKEY_IDENTIFIER_QUOTE_STRING, PROPKEY_STORED_IDENTIFIER_CASE| Constructor and Description |
|---|
MySqlDbSupport()
Creates support for MySql databases.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disableReferentialConstraints()
Disables all referential constraints (e.g. foreign keys) on all table in the schema
|
protected void |
disableReferentialConstraints(String tableName) |
void |
disableValueConstraints()
Disables all value constraints (e.g. not null) on all tables in the schema
|
protected void |
disableValueConstraints(String tableName) |
Set<String> |
getColumnNames(String tableName)
Gets the names of all columns of the given table.
|
Set<String> |
getIdentityColumnNames(String tableName)
Gets the names of all identity columns of the given table.
|
Set<String> |
getTableNames()
Returns the names of all tables in the database.
|
Set<String> |
getTriggerNames()
Retrieves the names of all the triggers in the database schema.
|
Set<String> |
getViewNames()
Retrieves the names of all the views in the database schema.
|
void |
incrementIdentityColumnToValue(String tableName,
String primaryKeyColumnName,
long identityValue)
Increments the identity value for the specified primary key on the specified table to the given value.
|
boolean |
supportsCascade()
Cascade are supported.
|
boolean |
supportsIdentityColumns()
Identity columns are supported.
|
boolean |
supportsTriggers()
Triggers are supported.
|
String |
toCorrectCaseIdentifier(String identifier)
Converts the given identifier to uppercase/lowercase
MySql does not treat quoted identifiers as case sensitive.
|
dropMaterializedView, dropSequence, dropSynonym, dropTable, dropTrigger, dropType, dropView, getDatabaseDialect, getIdentifierQuoteString, getLongDataType, getMaterializedViewNames, getSchemaName, getSequenceNames, getSequenceValue, getSQLHandler, getStoredIdentifierCase, getSynonymNames, getTextDataType, getTypeNames, incrementSequenceToValue, init, qualified, quoted, supportsMaterializedViews, supportsSequences, supportsSynonyms, supportsTypespublic Set<String> getTableNames()
getTableNames in class DbSupportpublic Set<String> getColumnNames(String tableName)
getColumnNames in class DbSupporttableName - The table, not nullpublic Set<String> getViewNames()
getViewNames in class DbSupportpublic Set<String> getTriggerNames()
getTriggerNames in class DbSupportpublic void disableReferentialConstraints()
disableReferentialConstraints in class DbSupportprotected void disableReferentialConstraints(String tableName)
public void disableValueConstraints()
disableValueConstraints in class DbSupportprotected void disableValueConstraints(String tableName)
public Set<String> getIdentityColumnNames(String tableName)
getIdentityColumnNames in class DbSupporttableName - The table, not nullpublic void incrementIdentityColumnToValue(String tableName, String primaryKeyColumnName, long identityValue)
incrementIdentityColumnToValue in class DbSupporttableName - The table with the identity column, not nullprimaryKeyColumnName - The column, not nullidentityValue - The new valuepublic String toCorrectCaseIdentifier(String identifier)
toCorrectCaseIdentifier in class DbSupportidentifier - The identifier, not nullpublic boolean supportsTriggers()
supportsTriggers in class DbSupportpublic boolean supportsIdentityColumns()
supportsIdentityColumns in class DbSupportpublic boolean supportsCascade()
supportsCascade in class DbSupportCopyright © 2016. All Rights Reserved.