public interface Dialect
This interface absorb the difference between RDBMSs.
The implementation instance must be thread safe.
| 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.
|
AutoGeneratedKeysType |
getAutoGeneratedKeysType()
Returns the type of the auto generated keys.
|
CriteriaBuilder |
getCriteriaBuilder() |
ExpressionFunctions |
getExpressionFunctions()
Returns the aggregation of the expression functions that are available in the SQL templates.
|
Sql<?> |
getIdentityReservationSql(java.lang.String catalogName,
java.lang.String schemaName,
java.lang.String tableName,
java.lang.String columnName,
boolean isQuoteRequired,
boolean isIdColumnQuoteRequired,
int reservationSize)
Returns an SQL object to reserve identity in the database.
|
Sql<?> |
getIdentitySelectSql(java.lang.String catalogName,
java.lang.String schemaName,
java.lang.String tableName,
java.lang.String columnName,
boolean isQuoteRequired,
boolean isIdColumnQuoteRequired)
Returns an SQL object to get IDENTITY values that are generated in the database.
|
JdbcMappingVisitor |
getJdbcMappingVisitor()
|
java.lang.String |
getName()
The dialect name.
|
JdbcType<java.sql.ResultSet> |
getResultSetType()
Returns the
JdbcType object that corresponds to the ResultSet class. |
java.lang.Throwable |
getRootCause(java.sql.SQLException sqlException)
Returns the root cause of the SQL exception.
|
java.lang.String |
getScriptBlockDelimiter()
Return the delimiter that is used as the end of an SQL block in a script.
|
Sql<?> |
getSequenceNextValSql(java.lang.String qualifiedSequenceName,
long allocationSize)
Returns an SQL object to get next sequence values.
|
SqlLogFormattingVisitor |
getSqlLogFormattingVisitor()
Return the visitor that maps
Wrapper to SqlLogFormatter. |
UpsertAssembler |
getUpsertAssembler(UpsertAssemblerContext context)
Returns the UpsertAssembler implementation for the given context.
|
boolean |
includesIdentityColumn()
Whether this object includes the IDENTITY column in SQL INSERT statements.
|
boolean |
isUniqueConstraintViolated(java.sql.SQLException sqlException)
Whether the
sqlException represents an unique violation. |
java.lang.String |
removeQuote(java.lang.String name)
Remove quotation marks from the name
|
default boolean |
supportsAliasInDeleteClause()
Whether this object supports alias reference in DELETE clause as follows:
|
default boolean |
supportsAliasInUpdateClause()
Whether this object supports alias reference in UPDATE clause as follows:
|
boolean |
supportsAutoGeneratedKeys()
Whether this object supports
Statement.getGeneratedKeys(). |
default boolean |
supportsBatchExecutionReturningGeneratedValues() |
boolean |
supportsBatchUpdateResults()
Whether this object supports the result of
Statement.executeBatch(). |
boolean |
supportsIdentity()
Whether this object supports the IDENTITY column.
|
boolean |
supportsIdentityReservation()
Whether this object supports a reservation of identity.
|
default boolean |
supportsModOperator()
Whether this object supports mod operator
%. |
boolean |
supportsResultSetReturningAsOutParameter()
Whether this object supports an out parameter that is mapped to a result set in stored
functions or stored procedures .
|
boolean |
supportsSelectForUpdate(SelectForUpdateType type,
boolean withTargets)
Whether this object supports pessimistic locking.
|
boolean |
supportsSequence()
Whether this object supports the SEQUENCE.
|
SqlNode |
transformSelectSqlNode(SqlNode sqlNode,
SelectOptions options)
Transforms the SQL node.
|
SqlNode |
transformSelectSqlNodeForGettingCount(SqlNode sqlNode)
Transforms the SQL node to get a row count.
|
java.lang.String getName()
SqlNode transformSelectSqlNode(SqlNode sqlNode, SelectOptions options)
sqlNode - the SQL nodeoptions - the optionsDomaNullPointerException - if any argument is nullJdbcException - if unsupported options are specifiedSqlNode transformSelectSqlNodeForGettingCount(SqlNode sqlNode)
sqlNode - the SQL nodeDomaNullPointerException - if any argument is nullboolean isUniqueConstraintViolated(java.sql.SQLException sqlException)
sqlException represents an unique violation.sqlException - the SQL exceptiontrue, if the sqlException represents an unique violationDomaNullPointerException - if sqlException is nullboolean includesIdentityColumn()
true, if this object includes itboolean supportsIdentity()
true, if this object supports itboolean supportsSequence()
true, if this object supports itboolean supportsAutoGeneratedKeys()
Statement.getGeneratedKeys().true, if this object supports itboolean supportsBatchUpdateResults()
Statement.executeBatch().true, if this object supports itdefault boolean supportsBatchExecutionReturningGeneratedValues()
boolean supportsSelectForUpdate(SelectForUpdateType type, boolean withTargets)
type - a kind of pessimistic lockingwithTargets - true if a lock target is specifiedtrue, if this object supports itboolean supportsResultSetReturningAsOutParameter()
true, if this object supports itboolean supportsIdentityReservation()
true, if this object supports itdefault boolean supportsAliasInDeleteClause()
DELETE t FROM employee t
true, if this object supports itdefault boolean supportsAliasInUpdateClause()
UPDATE t SET t.age = 30 FROM employee t
true, if this object supports itdefault boolean supportsModOperator()
%.true, if this object supports itSql<?> getIdentitySelectSql(java.lang.String catalogName, java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName, boolean isQuoteRequired, boolean isIdColumnQuoteRequired)
This method is available, only if supportsIdentity() returns true.
catalogName - the catalog nameschemaName - the schema nametableName - the table namecolumnName - the IDENTITY column nameisQuoteRequired - whether the quotation marks are requiredisIdColumnQuoteRequired - whether the quotation marks are required for the IDENTITY columnDomaNullPointerException - if either the tableName or the columnName is
nullSql<?> getIdentityReservationSql(java.lang.String catalogName, java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName, boolean isQuoteRequired, boolean isIdColumnQuoteRequired, int reservationSize)
This method is available, only if supportsIdentityReservation() returns true.
catalogName - the catalog nameschemaName - the schema nametableName - the table namecolumnName - the IDENTITY column nameisQuoteRequired - whether the quotation marks are requiredisIdColumnQuoteRequired - whether the quotation marks are required for the IDENTITY columnreservationSize - the size of the reservationDomaNullPointerException - if either the tableName or the columnName is
nullSql<?> getSequenceNextValSql(java.lang.String qualifiedSequenceName, long allocationSize)
This method is available, only if supportsSequence() returns true.
qualifiedSequenceName - the qualified sequence nameallocationSize - the allocation size of the sequenceDomaNullPointerException - if qualifiedSequenceName is nullJdbcType<java.sql.ResultSet> getResultSetType()
JdbcType object that corresponds to the ResultSet class.
This method is available, only if supportsResultSetReturningAsOutParameter() is
true.
JdbcType object for the ResultSet classjava.lang.String applyQuote(java.lang.String name)
name - the name of a database object such as a table, a column, and so onjava.lang.String removeQuote(java.lang.String name)
name - the name of a database object such as a table, a column, and so onjava.lang.Throwable getRootCause(java.sql.SQLException sqlException)
sqlException - the SQL exceptionDomaNullPointerException - if the sqlException is nullJdbcMappingVisitor getJdbcMappingVisitor()
SqlLogFormattingVisitor getSqlLogFormattingVisitor()
Wrapper to SqlLogFormatter.ExpressionFunctions getExpressionFunctions()
ScriptBlockContext createScriptBlockContext()
java.lang.String getScriptBlockDelimiter()
AutoGeneratedKeysType getAutoGeneratedKeysType()
CriteriaBuilder getCriteriaBuilder()
UpsertAssembler getUpsertAssembler(UpsertAssemblerContext context)
context - the UpsertAssemblerContext object