|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.unitils.core.dbsupport.DbSupport
org.unitils.core.dbsupport.MySqlDbSupport
public class MySqlDbSupport
Implementation of DbSupport
for a MySql database.
Field Summary |
---|
Fields inherited from class org.unitils.core.dbsupport.DbSupport |
---|
PROPKEY_IDENTIFIER_QUOTE_STRING, PROPKEY_STORED_IDENTIFIER_CASE |
Constructor Summary | |
---|---|
MySqlDbSupport()
Creates support for MySql databases. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.unitils.core.dbsupport.DbSupport |
---|
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, supportsTypes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MySqlDbSupport()
Method Detail |
---|
public Set<String> getTableNames()
getTableNames
in class DbSupport
public Set<String> getColumnNames(String tableName)
getColumnNames
in class DbSupport
tableName
- The table, not null
public Set<String> getViewNames()
getViewNames
in class DbSupport
public Set<String> getTriggerNames()
getTriggerNames
in class DbSupport
public void disableReferentialConstraints()
disableReferentialConstraints
in class DbSupport
protected void disableReferentialConstraints(String tableName)
public void disableValueConstraints()
disableValueConstraints
in class DbSupport
protected void disableValueConstraints(String tableName)
public Set<String> getIdentityColumnNames(String tableName)
getIdentityColumnNames
in class DbSupport
tableName
- The table, not null
public void incrementIdentityColumnToValue(String tableName, String primaryKeyColumnName, long identityValue)
incrementIdentityColumnToValue
in class DbSupport
tableName
- The table with the identity column, not nullprimaryKeyColumnName
- The column, not nullidentityValue
- The new valuepublic String toCorrectCaseIdentifier(String identifier)
toCorrectCaseIdentifier
in class DbSupport
identifier
- The identifier, not null
public boolean supportsTriggers()
supportsTriggers
in class DbSupport
public boolean supportsIdentityColumns()
supportsIdentityColumns
in class DbSupport
public boolean supportsCascade()
supportsCascade
in class DbSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |