public interface DbmsDialect
CriteriaBuilderConfiguration.registerDialect(java.lang.String, com.blazebit.persistence.spi.DbmsDialect)| Modifier and Type | Method | 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.
|
ResultSet |
extractReturningResult(PreparedStatement ps) |
TODO: documentation.
|
String |
getDummyTable() |
Returns the name of a dummy table like DUAL in Oracle or null if none is required.
|
int |
getPrepareFlags() |
TODO: documentation.
|
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 |
isNullSmallest() |
Returns true if the dbms treats null as the smallest value, false is highest.
|
boolean |
needsCastParameters() |
Returns whether parameters need to be casted if occurring in an untyped context like e.g.
|
boolean |
needsReturningSqlTypes() |
Returns whether sql types for the returning columns need to be provided.
|
PreparedStatement |
prepare(PreparedStatement ps,
int[] returningSqlTypes) |
TODO: documentation.
|
boolean |
supportsBooleanAggregation() |
Returns true if the dbms supports boolean aggregation through EVERY / SOME / ANY
/ BOOL_AND / BOOL_OR.
|
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 |
supportsFilterClause() |
Returns true if the dbms supports the FILTER clause on aggregate functions.
|
boolean |
supportsFullRowValueComparison() |
Returns true if the dbms supports all <, <=, >, >=, =, <> comparison operations for row values.
|
boolean |
supportsGroupByExpressionInHavingMatching() |
Returns true if the dbms supports matching non-trivial expressions that appear in the group by clause with usages in the having clause.
|
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 |
supportsNullPrecedence() |
Returns true if the dbms supports null precedence for ORDER BY clause.
|
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 |
supportsRowValueConstructor() |
Returns true if the dbms supports row value constructor syntax, false otherwise.
|
boolean |
supportsUnion(boolean all) |
Returns true if the dbms supports the set operation UNION, false otherwise.
|
boolean |
supportsWindowFunctions() |
Returns true if the dbms supports window functions.
|
boolean |
supportsWindowNullPrecedence() |
Returns true if the dbms supports null precedence for order clauses in the WINDOW clause.
|
boolean |
supportsWithClause() |
Returns true if the dbms supports the with clause, false otherwise.
|
boolean |
supportsWithClauseHead() |
Returns true if the dbms supports the with clause head for aliasing, 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 supportsWithClause()
boolean supportsNonRecursiveWithClause()
boolean supportsWithClauseHead()
String getWithClause(boolean recursive)
recursive - Whether the clause should be able to contain recursive queries or notMap<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 otherwiseisEmbedded - 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 supportsGroupByExpressionInHavingMatching()
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()
boolean supportsRowValueConstructor()
boolean supportsFullRowValueComparison()
boolean supportsWindowFunctions()
boolean supportsFilterClause()
boolean supportsNullPrecedence()
boolean supportsWindowNullPrecedence()
boolean supportsBooleanAggregation()
boolean isNullSmallest()
String getSqlType(Class<?> castType)
castType - The java class typeValuesStrategy getValuesStrategy()
boolean needsCastParameters()
String getDummyTable()
String cast(String expression, String sqlType)
expression - The expression to castsqlType - The type to which to castboolean needsReturningSqlTypes()
int getPrepareFlags()
PreparedStatement prepare(PreparedStatement ps, int[] returningSqlTypes) throws SQLException
ps - TODO: documentationreturningSqlTypes - TODO: documentationSQLException - When preparing the statement failsResultSet extractReturningResult(PreparedStatement ps) throws SQLException
ps - TODO: documentationSQLException - When extracting from the statement failsCopyright © 2014–2020 Blazebit. All rights reserved.