public class MySQLDialect extends Object implements SQLDialect
SQLDialect
.SQLDialect.LimitHandler
Constructor and Description |
---|
MySQLDialect() |
Modifier and Type | Method and Description |
---|---|
boolean |
deleteStatementTargetRequired()
Get whether the DELETE clause target must be specified.
|
boolean |
generatedKeyAlwaysReturned()
Retrieves whether a generated key will always be returned if the column name(s) or index(es) specified for the
auto generated key column(s) are valid and the statement succeeds.
|
Optional<SQLDialect.LimitHandler> |
getLimitHandler()
Get the
SQLDialect.LimitHandler |
Optional<String> |
getLockClause(com.holonplatform.core.query.lock.LockMode mode,
long timeout)
Get the SQL lock clause for given lock condition.
|
void |
init(SQLDialectContext context)
Dialect initialization hook at parent datastore initialization.
|
boolean |
supportsGetGeneratedKeys()
Retrieves whether auto-generated keys can be retrieved after a statement has been executed.
|
boolean |
supportsLikeEscapeClause()
Retrieves whether this database supports specifying a
LIKE escape clause. |
com.holonplatform.core.exceptions.DataAccessException |
translateException(SQLException exception)
Translates given
SQLException into a suitable DataAccessException . |
boolean |
updateStatementFromSupported()
Get whether a FROM clause is supported in the UPDATE clause.
|
boolean |
useOuterInJoins()
Get whether to use the
OUTER keyword in join serialization. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
db2, deleteStatementAliasSupported, derby, detect, getColumnName, getJavaType, getLockHint, getSqlType, getTableName, h2, HANA, hsqldb, informix, mariaDB, mySQL, oracle, postgreSQL, resolveFunction, sqlite, sqlServer, supportGetGeneratedKeyByName, supportsBinaryStreamParameter, supportsSqlType, updateStatementAliasSupported, updateStatementSetAliasSupported
public void init(SQLDialectContext context) throws SQLException
SQLDialect
init
in interface SQLDialect
context
- Dialect contextSQLException
- An error occurred during dialect initializationpublic boolean updateStatementFromSupported()
SQLDialect
updateStatementFromSupported
in interface SQLDialect
true
if a FROM clause is supported in the UPDATE clausepublic boolean supportsLikeEscapeClause()
SQLDialect
LIKE
escape clause.supportsLikeEscapeClause
in interface SQLDialect
true
if so; false
otherwisepublic boolean supportsGetGeneratedKeys()
SQLDialect
supportsGetGeneratedKeys
in interface SQLDialect
true
if auto-generated keys can be retrieved after a statement has executed;
false
otherwisepublic boolean generatedKeyAlwaysReturned()
SQLDialect
generatedKeyAlwaysReturned
in interface SQLDialect
true
if so; false
otherwisepublic boolean useOuterInJoins()
SQLDialect
OUTER
keyword in join serialization.useOuterInJoins
in interface SQLDialect
true
to use the OUTER
keyword in join serializationpublic boolean deleteStatementTargetRequired()
SQLDialect
deleteStatementTargetRequired
in interface SQLDialect
true
if the DELETE clause target must be specifiedpublic Optional<String> getLockClause(com.holonplatform.core.query.lock.LockMode mode, long timeout)
SQLDialect
getLockClause
in interface SQLDialect
mode
- Lock modetimeout
- Lock timeout in millisecondspublic com.holonplatform.core.exceptions.DataAccessException translateException(SQLException exception)
SQLDialect
SQLException
into a suitable DataAccessException
.translateException
in interface SQLDialect
exception
- Exception to translate (not null)DataAccessException
public Optional<SQLDialect.LimitHandler> getLimitHandler()
SQLDialect
SQLDialect.LimitHandler
getLimitHandler
in interface SQLDialect
Copyright © 2019 The Holon Platform. All rights reserved.