public class MysqlDialect extends StandardDialect
| Modifier and Type | Class and Description |
|---|---|
static class |
MysqlDialect.MysqlCriteriaBuilder |
static class |
MysqlDialect.MysqlExpressionFunctions |
static class |
MysqlDialect.MysqlJdbcMappingVisitor |
static class |
MysqlDialect.MysqlScriptBlockContext |
static class |
MysqlDialect.MysqlSqlLogFormattingVisitor |
static class |
MysqlDialect.MySqlVersion |
StandardDialect.StandardCriteriaBuilder, StandardDialect.StandardExpressionFunctions, StandardDialect.StandardJdbcMappingVisitor, StandardDialect.StandardScriptBlockContext, StandardDialect.StandardSqlLogFormattingVisitor| Modifier and Type | Field and Description |
|---|---|
protected static char |
CLOSE_QUOTE
the quotation mark of the end
|
static MysqlDialect.MySqlVersion |
DEFAULT_VERSION |
protected static char |
OPEN_QUOTE
the quotation mark of the start
|
protected static java.util.Set<java.lang.Integer> |
UNIQUE_CONSTRAINT_VIOLATION_ERROR_CODES
the set of SQLState code that represents unique violation
|
protected MysqlDialect.MySqlVersion |
version |
expressionFunctions, jdbcMappingVisitor, sqlLogFormattingVisitor, UNIQUE_CONSTRAINT_VIOLATION_STATE_CODES| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
applyQuote(java.lang.String name)
Enclose the name with quotation marks.
|
ScriptBlockContext |
createScriptBlockContext()
Creates the context object to process an SQL block in a script.
|
CriteriaBuilder |
getCriteriaBuilder() |
java.lang.String |
getName()
The dialect name.
|
java.lang.String |
getScriptBlockDelimiter()
Return the delimiter that is used as the end of an SQL block in a script.
|
UpsertAssembler |
getUpsertAssembler(UpsertAssemblerContext context)
Returns the UpsertAssembler implementation for the given context.
|
boolean |
isUniqueConstraintViolated(java.sql.SQLException sqlException)
Whether the
sqlException represents an unique violation. |
boolean |
supportsAliasInDeleteClause()
Whether this object supports alias reference in DELETE clause as follows:
|
boolean |
supportsAutoGeneratedKeys()
Whether this object supports
Statement.getGeneratedKeys(). |
boolean |
supportsIdentity()
Whether this object supports the IDENTITY column.
|
boolean |
supportsSelectForUpdate(SelectForUpdateType type,
boolean withTargets)
Whether this object supports pessimistic locking.
|
protected SqlNode |
toCountCalculatingSqlNode(SqlNode sqlNode) |
protected SqlNode |
toCountGettingSqlNode(SqlNode sqlNode) |
protected SqlNode |
toForUpdateSqlNode(SqlNode sqlNode,
SelectForUpdateType forUpdateType,
int waitSeconds,
java.lang.String... aliases) |
protected SqlNode |
toPagingSqlNode(SqlNode sqlNode,
long offset,
long limit) |
getAutoGeneratedKeysType, getCauseSQLException, getErrorCode, getExpressionFunctions, getIdentityReservationSql, getIdentitySelectSql, getJdbcMappingVisitor, getResultSetType, getRootCause, getSequenceNextValSql, getSqlLogFormattingVisitor, getSQLState, includesIdentityColumn, removeQuote, supportsBatchUpdateResults, supportsIdentityReservation, supportsResultSetReturningAsOutParameter, supportsSequence, transformSelectSqlNode, transformSelectSqlNodeForGettingCountclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsupportsAliasInUpdateClause, supportsBatchExecutionReturningGeneratedValues, supportsModOperatorprotected static final java.util.Set<java.lang.Integer> UNIQUE_CONSTRAINT_VIOLATION_ERROR_CODES
protected static final char OPEN_QUOTE
protected static final char CLOSE_QUOTE
public static final MysqlDialect.MySqlVersion DEFAULT_VERSION
protected final MysqlDialect.MySqlVersion version
public MysqlDialect()
public MysqlDialect(MysqlDialect.MySqlVersion version)
public MysqlDialect(JdbcMappingVisitor jdbcMappingVisitor)
public MysqlDialect(JdbcMappingVisitor jdbcMappingVisitor, MysqlDialect.MySqlVersion version)
public MysqlDialect(SqlLogFormattingVisitor sqlLogFormattingVisitor)
public MysqlDialect(SqlLogFormattingVisitor sqlLogFormattingVisitor, MysqlDialect.MySqlVersion version)
public MysqlDialect(ExpressionFunctions expressionFunctions)
public MysqlDialect(ExpressionFunctions expressionFunctions, MysqlDialect.MySqlVersion version)
public MysqlDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor)
public MysqlDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor, MysqlDialect.MySqlVersion version)
public MysqlDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor, ExpressionFunctions expressionFunctions)
public MysqlDialect(JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor, ExpressionFunctions expressionFunctions, MysqlDialect.MySqlVersion version)
public java.lang.String getName()
DialectgetName in interface DialectgetName in class StandardDialectpublic boolean isUniqueConstraintViolated(java.sql.SQLException sqlException)
DialectsqlException represents an unique violation.isUniqueConstraintViolated in interface DialectisUniqueConstraintViolated in class StandardDialectsqlException - the SQL exceptiontrue, if the sqlException represents an unique violationpublic boolean supportsAutoGeneratedKeys()
DialectStatement.getGeneratedKeys().supportsAutoGeneratedKeys in interface DialectsupportsAutoGeneratedKeys in class StandardDialecttrue, if this object supports itpublic boolean supportsIdentity()
DialectsupportsIdentity in interface DialectsupportsIdentity in class StandardDialecttrue, if this object supports itpublic boolean supportsSelectForUpdate(SelectForUpdateType type, boolean withTargets)
DialectsupportsSelectForUpdate in interface DialectsupportsSelectForUpdate in class StandardDialecttype - a kind of pessimistic lockingwithTargets - true if a lock target is specifiedtrue, if this object supports itpublic boolean supportsAliasInDeleteClause()
DialectDELETE t FROM employee t
true, if this object supports itprotected SqlNode toCountCalculatingSqlNode(SqlNode sqlNode)
toCountCalculatingSqlNode in class StandardDialectprotected SqlNode toPagingSqlNode(SqlNode sqlNode, long offset, long limit)
toPagingSqlNode in class StandardDialectprotected SqlNode toForUpdateSqlNode(SqlNode sqlNode, SelectForUpdateType forUpdateType, int waitSeconds, java.lang.String... aliases)
toForUpdateSqlNode in class StandardDialectprotected SqlNode toCountGettingSqlNode(SqlNode sqlNode)
toCountGettingSqlNode in class StandardDialectpublic java.lang.String getScriptBlockDelimiter()
DialectgetScriptBlockDelimiter in interface DialectgetScriptBlockDelimiter in class StandardDialectpublic ScriptBlockContext createScriptBlockContext()
DialectcreateScriptBlockContext in interface DialectcreateScriptBlockContext in class StandardDialectpublic java.lang.String applyQuote(java.lang.String name)
DialectapplyQuote in interface DialectapplyQuote in class StandardDialectname - the name of a database object such as a table, a column, and so onpublic CriteriaBuilder getCriteriaBuilder()
getCriteriaBuilder in interface DialectgetCriteriaBuilder in class StandardDialectpublic UpsertAssembler getUpsertAssembler(UpsertAssemblerContext context)
DialectgetUpsertAssembler in interface DialectgetUpsertAssembler in class StandardDialectcontext - the UpsertAssemblerContext object