public interface DbmsDialect
CriteriaBuilderConfiguration.registerDialect(java.lang.String, com.blazebit.persistence.spi.DbmsDialect)
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
appendExtendedSql(StringBuilder sqlSb,
DbmsStatementType statementType,
boolean isSubquery,
boolean isEmbedded,
StringBuilder withClause,
String limit,
String offset,
String[] returningColumns,
Map<DbmsModificationState,String> includedModificationStates)
Appends the with clause to the sql string builder.
|
void |
appendSet(StringBuilder sqlSb,
SetOperationType setType,
boolean isSubquery,
List<String> operands,
List<? extends OrderByElement> orderByElements,
String limit,
String offset)
Connects the given operands with the given set operation and appends that to the sql string builder.
|
String |
cast(String expression,
String sqlType)
Returns the cast expression for the given expression to the given sql type.
|
DbmsLimitHandler |
createLimitHandler()
Creates a new limit handler for an SQL query.
|
String |
getDummyTable()
Returns the name of a dummy table like DUAL in Oracle or null if none is required.
|
String |
getSqlType(Class<?> castType)
Returns the sql type for the java class type for usage in cast expressions.
|
ValuesStrategy |
getValuesStrategy()
Returns the strategy to use for values generation.
|
String |
getWithClause(boolean recursive)
Returns the SQL representation for the normal or recursive with clause.
|
boolean |
needsCastParameters()
Returns whether parameters need to be casted if occurring in an untyped context like e.g.
|
boolean |
supportsComplexGroupBy()
Returns true if the dbms supports complex expressions like subqueries as group by elements, false otherwise.
|
boolean |
supportsComplexJoinOn()
Returns true if the dbms supports complex expressions like subqueries in the join on clause, false otherwise.
|
boolean |
supportsExcept(boolean all)
Returns true if the dbms supports the set operation EXCEPT, false otherwise.
|
boolean |
supportsIntersect(boolean all)
Returns true if the dbms supports the set operation INTERSECT, false otherwise.
|
boolean |
supportsJoinsInRecursiveCte()
Returns true if the dbms supports joins in the recursive part of a CTE, false otherwise.
|
boolean |
supportsModificationQueryInWithClause()
Returns true if the dbms supports modification queries in the with clause, false otherwise.
|
boolean |
supportsNonRecursiveWithClause()
Returns true if the dbms supports the non-recursive with clause, false otherwise.
|
boolean |
supportsReturningAllGeneratedKeys()
Returns true if the dbms supports returning all generated keys, false otherwise.
|
boolean |
supportsReturningColumns()
Returns true if the dbms supports returning columns from a modified row, false otherwise.
|
boolean |
supportsReturningGeneratedKeys()
Returns true if the dbms supports returning generated keys, false otherwise.
|
boolean |
supportsTupleDistinctCounts()
Returns true if the dbms supports count distinct with multiple columns, false otherwise.
|
boolean |
supportsUnion(boolean all)
Returns true if the dbms supports the set operation UNION, false otherwise.
|
boolean |
supportsWithClause()
Returns true if the dbms supports the with clause, false otherwise.
|
boolean |
supportsWithClauseInModificationQuery()
Returns true if the dbms supports the with clause in modification queries, false otherwise.
|
boolean |
usesExecuteUpdateWhenWithClauseInModificationQuery()
Returns true if the dbms wants to use the JDBC executeUpdate method when using the with clause in modification queries, false otherwise.
|
boolean supportsTupleDistinctCounts()
boolean supportsWithClause()
boolean supportsNonRecursiveWithClause()
String getWithClause(boolean recursive)
context
- The context into which the function should be renderedMap<String,String> appendExtendedSql(StringBuilder sqlSb, DbmsStatementType statementType, boolean isSubquery, boolean isEmbedded, StringBuilder withClause, String limit, String offset, String[] returningColumns, Map<DbmsModificationState,String> includedModificationStates)
sqlSb
- The sql string builder to which the with clause should be append tostatementType
- The type of the statement in the sql string builderisSubquery
- True if the query in the sql string builder is a subquery, false otherwiseisSubquery
- True if the query in the sql string builder will be embedded in a clause, false otherwisewithClause
- The with clause which should be appended, or null if nonelimit
- The limit for the limit clause, or null if no limitoffset
- The offset for the offset clause, or null if no offsetreturningColumns
- The columns which the sql should return or null if noneincludedModificationStates
- The modification states of the returned columns for which additional CTEs should be generated mapped to the expected CTE namesvoid appendSet(StringBuilder sqlSb, SetOperationType setType, boolean isSubquery, List<String> operands, List<? extends OrderByElement> orderByElements, String limit, String offset)
sqlSb
- The sql string builder to which the connected operands should be appended tosetType
- The type of the set connectionisSubquery
- True if the query in the sql string builder is a subquery, false otherwiseoperands
- An list of operand sql stringsorderByElements
- The order by elements of the composite set operationlimit
- The limit for the limit clause, or null if no limitoffset
- The offset for the offset clause, or null if no offsetDbmsLimitHandler createLimitHandler()
boolean supportsWithClauseInModificationQuery()
boolean supportsModificationQueryInWithClause()
boolean usesExecuteUpdateWhenWithClauseInModificationQuery()
boolean supportsReturningGeneratedKeys()
boolean supportsReturningAllGeneratedKeys()
boolean supportsReturningColumns()
boolean supportsComplexGroupBy()
boolean supportsComplexJoinOn()
boolean supportsUnion(boolean all)
all
- True if the non-distinct ALL operation should be checked, false otherwise.boolean supportsIntersect(boolean all)
all
- True if the non-distinct ALL operation should be checked, false otherwise.boolean supportsExcept(boolean all)
all
- True if the non-distinct ALL operation should be checked, false otherwise.boolean supportsJoinsInRecursiveCte()
String getSqlType(Class<?> castType)
castType
- The java class typeValuesStrategy getValuesStrategy()
boolean needsCastParameters()
String getDummyTable()
Copyright © 2016 Blazebit. All Rights Reserved.