net.sf.hibernate.dialect
Class MySQLDialect

java.lang.Object
  extended bynet.sf.hibernate.dialect.Dialect
      extended bynet.sf.hibernate.dialect.MySQLDialect

public class MySQLDialect
extends Dialect

An SQL dialect for MySQL.

Author:
Gavin King

Field Summary
 
Fields inherited from class net.sf.hibernate.dialect.Dialect
CLOSED_QUOTE, QUOTE
 
Constructor Summary
MySQLDialect()
           
 
Method Summary
 char closeQuote()
          The closing quote for a quoted identifier
 boolean dropConstraints()
          Do we need to drop constraints before dropping tables in this dialect?
 String getAddColumnString()
          The syntax used to add a column to a table (optional).
 String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey)
          The syntax used to add a foreign key constraint to a table.
 String getIdentityColumnString()
          The keyword used to specify an identity column, if identity column key generation is supported.
 String getIdentitySelectString()
          The syntax that returns the identity value of the last insert, if identity column key generation is supported.
 String getLimitString(String sql, boolean hasOffset)
          Add a LIMIT clause to the given SQL SELECT
 char getSchemaSeparator()
          The separator between the schema/tablespace name and the table name.
 char openQuote()
          The opening quote for a quoted identifier
 boolean qualifyIndexName()
          Do we need to qualify index names with the schema name?
 boolean supportsIdentityColumns()
          Does this dialect support identity column key generation?
 boolean supportsIfExistsBeforeTableName()
           
 boolean supportsLimit()
          Does this Dialect have some kind of LIMIT syntax?
 
Methods inherited from class net.sf.hibernate.dialect.Dialect
appendIdentitySelectToInsert, bindLimitParametersFirst, bindLimitParametersInReverseOrder, createCaseFragment, createOuterJoinFragment, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getCreateSequenceString, getDefaultProperties, getDialect, getDialect, getDropSequenceString, getFunctions, getIdentityInsertString, getLimitString, getLowercaseFunction, getNoColumnsInsertString, getNullColumnString, getQuerySequencesString, getSequenceNextValString, getTypeName, getTypeName, hasAlterTable, hasDataTypeInIdentityColumn, registerColumnType, registerColumnType, registerFunction, supportsCheck, supportsForUpdate, supportsForUpdateNowait, supportsForUpdateOf, supportsIfExistsAfterTableName, supportsLimitOffset, supportsSequences, supportsUnique, supportsVariableLimit, toString, useMaxForLimit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MySQLDialect

public MySQLDialect()
Method Detail

getAddColumnString

public String getAddColumnString()
Description copied from class: Dialect
The syntax used to add a column to a table (optional).

Overrides:
getAddColumnString in class Dialect

dropConstraints

public boolean dropConstraints()
Description copied from class: Dialect
Do we need to drop constraints before dropping tables in this dialect?

Overrides:
dropConstraints in class Dialect
Returns:
boolean

qualifyIndexName

public boolean qualifyIndexName()
Description copied from class: Dialect
Do we need to qualify index names with the schema name?

Overrides:
qualifyIndexName in class Dialect
Returns:
boolean

supportsIdentityColumns

public boolean supportsIdentityColumns()
Description copied from class: Dialect
Does this dialect support identity column key generation?

Overrides:
supportsIdentityColumns in class Dialect
Returns:
boolean

getIdentitySelectString

public String getIdentitySelectString()
Description copied from class: Dialect
The syntax that returns the identity value of the last insert, if identity column key generation is supported.

Overrides:
getIdentitySelectString in class Dialect

getIdentityColumnString

public String getIdentityColumnString()
Description copied from class: Dialect
The keyword used to specify an identity column, if identity column key generation is supported.

Overrides:
getIdentityColumnString in class Dialect

getAddForeignKeyConstraintString

public String getAddForeignKeyConstraintString(String constraintName,
                                               String[] foreignKey,
                                               String referencedTable,
                                               String[] primaryKey)
Description copied from class: Dialect
The syntax used to add a foreign key constraint to a table.

Overrides:
getAddForeignKeyConstraintString in class Dialect
Returns:
String

supportsLimit

public boolean supportsLimit()
Description copied from class: Dialect
Does this Dialect have some kind of LIMIT syntax?

Overrides:
supportsLimit in class Dialect

getLimitString

public String getLimitString(String sql,
                             boolean hasOffset)
Description copied from class: Dialect
Add a LIMIT clause to the given SQL SELECT

Overrides:
getLimitString in class Dialect
Returns:
the modified SQL

closeQuote

public char closeQuote()
Description copied from class: Dialect
The closing quote for a quoted identifier

Overrides:
closeQuote in class Dialect

openQuote

public char openQuote()
Description copied from class: Dialect
The opening quote for a quoted identifier

Overrides:
openQuote in class Dialect

supportsIfExistsBeforeTableName

public boolean supportsIfExistsBeforeTableName()
Overrides:
supportsIfExistsBeforeTableName in class Dialect

getSchemaSeparator

public char getSchemaSeparator()
Description copied from class: Dialect
The separator between the schema/tablespace name and the table name.

Overrides:
getSchemaSeparator in class Dialect