public class MySqlDialect extends SqlDialect
| Modifier and Type | Field and Description |
|---|---|
static int |
VARCHAR_MAX_LENGTH
The Max length of VARCHAR database type
|
COMMON_SEQ_TABLE_KEY, DEFAULT_SCHEMA_SYMBOL, ormHandler| Constructor and Description |
|---|
MySqlDialect() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getColumnType(MetaColumn column)
MySQL dialect uses a database type DATETIME (instead of the TIMESTAMP) for the java.util.Date.
|
protected String |
getEngine(MetaTable table)
Returns a MySQL enginge.
|
String |
getJdbcDriver()
Returns a JDBC driver class name.
|
String |
getJdbcUrl()
Returns a default JDBC URL
|
boolean |
isCatalog()
Does the database support a catalog?
The feature supports: MySqlDialect and MSSqlDialect.
|
Appendable |
printComment(MetaColumn column,
Appendable out)
Important note for MySQL: the change of column modifies all another column attributes so the comment update can revert some hand-made changes different from meta-model.
See the official MySQL documentation for more information. |
Appendable |
printComment(MetaTable table,
Appendable out)
Print a Comment on the table
|
Appendable |
printDelete(CriterionDecoder decoder,
Appendable out)
Print an SQL DELETE statement.
|
Appendable |
printQuotedNameAlways(CharSequence name,
Appendable sql)
Prints quoted name (identifier) to SQL always.
|
Appendable |
printSequenceTable(MetaDatabase db,
Appendable out)
Print SQL CREATE SEQUENCE.
|
Appendable |
printTable(MetaTable table,
Appendable out)
Print a SQL sript to create table
|
Appendable |
printUpdate(List<MetaColumn> changedColumns,
CriterionDecoder decoder,
Appendable out)
Print an SQL UPDATE statement.
|
protected Appendable |
printWhere(CriterionDecoder decoder,
TableWrapper[] tables,
Appendable out)
Print where condition for DELETE / UPDATE
TODO: FIX THE IMPLEMENTATION - probably in the CriterionDecoder class
|
createConnection, createJndiInitialContext, createSubQuery, escape, getAliasColumnName, getCriterionTemplate, getExtentedDialect, getKeywordSet, getNameProvider, getQuotedName, getSeqTableModel, isColumnLengthAllowed, isFilled, isMultiRowInsertSupported, printAlterTableAddColumn, printAlterTableColumn, printCall, printColumnAlias, printColumnDeclaration, printCommit, printCreateSchema, printCriterion, printCriterionValue, printDefaultConstraint, printDefaultSchema, printDefaultValue, printFKColumnsDeclaration, printForeignKey, printForeignKey, printFullTableName, printFullTableName, printIndex, printInsert, printInsert, printInsertBySelect, println, printLockForSelect, printOffset, printQuotedName, printSelect, printSelectOrder, printSelectTable, printSelectTableBase, printSelectView, printSequenceCurrentValue, printSequenceDeleteById, printSequenceInit, printSequenceInitWithValues, printSequenceNextValue, printSequenceTableName, printSetMaxSequence, printTableAliasDefinition, printTableColumns, releaseSavepoint, setHandlerpublic static final int VARCHAR_MAX_LENGTH
public String getJdbcUrl()
SqlDialectgetJdbcUrl in class SqlDialectpublic String getJdbcDriver()
SqlDialectgetJdbcDriver in class SqlDialectpublic boolean isCatalog()
isCatalog in class SqlDialecttrue.public Appendable printDelete(CriterionDecoder decoder, Appendable out) throws IOException
printDelete in class SqlDialectIOExceptionpublic Appendable printUpdate(List<MetaColumn> changedColumns, CriterionDecoder decoder, Appendable out) throws IOException
SqlDialectprintUpdate in class SqlDialectIOExceptionprotected Appendable printWhere(CriterionDecoder decoder, TableWrapper[] tables, Appendable out) throws IOException
IOExceptionpublic Appendable printSequenceTable(MetaDatabase db, Appendable out) throws IOException
SqlDialectprintSequenceTable in class SqlDialectIOExceptionpublic Appendable printTable(MetaTable table, Appendable out) throws IOException
SqlDialectprintTable in class SqlDialectIOExceptionprotected String getEngine(MetaTable table)
protected String getColumnType(MetaColumn column)
getColumnType in class SqlDialectpublic Appendable printComment(MetaTable table, Appendable out) throws IOException
printComment in class SqlDialectIOExceptionpublic Appendable printComment(MetaColumn column, Appendable out) throws IOException
printComment in class SqlDialectIOExceptionpublic Appendable printQuotedNameAlways(CharSequence name, Appendable sql) throws IOException
printQuotedNameAlways in class SqlDialectname - Name (identifier) for quotingsql - Target SQL for printing new quoted nameIOExceptionCopyright 2013, Pavel Ponec