Package org.hibernate.dialect
Class MariaDBSqlAstTranslator<T extends JdbcOperation>
- java.lang.Object
-
- org.hibernate.sql.ast.spi.AbstractSqlAstTranslator<T>
-
- org.hibernate.dialect.MariaDBSqlAstTranslator<T>
-
- All Implemented Interfaces:
Appendable
,SqlAppender
,SqlAstTranslator<T>
,SqlAstWalker
public class MariaDBSqlAstTranslator<T extends JdbcOperation> extends AbstractSqlAstTranslator<T>
A SQL AST translator for MariaDB.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.sql.ast.spi.AbstractSqlAstTranslator
AbstractSqlAstTranslator.ForUpdateClause, AbstractSqlAstTranslator.LockStrategy, AbstractSqlAstTranslator.SubQueryRelationalRestrictionEmulationRenderer<X extends Expression>
-
-
Field Summary
-
Fields inherited from interface org.hibernate.sql.ast.spi.SqlAppender
CLOSE_PARENTHESIS, COMA_SEPARATOR, COMA_SEPARATOR_CHAR, NO_SEPARATOR, NULL_KEYWORD, OPEN_PARENTHESIS, PARAM_MARKER, WHITESPACE
-
-
Constructor Summary
Constructors Constructor Description MariaDBSqlAstTranslator(SessionFactoryImplementor sessionFactory, Statement statement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MariaDBDialect
getDialect()
protected String
getForShare(int timeoutMillis)
protected String
getFromDual()
Some databases require a bit of syntactic noise when there are no tables in the from clause.protected String
getFromDualForSelectOnly()
protected void
renderComparison(Expression lhs, ComparisonOperator operator, Expression rhs)
protected void
renderExpressionAsClauseItem(Expression expression)
protected void
renderPartitionItem(Expression expression)
protected boolean
shouldEmulateFetchClause(QueryPart queryPart)
protected boolean
shouldEmulateLateralWithIntersect(QueryPart queryPart)
protected boolean
supportsDistinctFromPredicate()
Is this SQL dialect known to support some kind of distinct from predicate.protected boolean
supportsIntersect()
protected boolean
supportsNestedSubqueryCorrelation()
protected boolean
supportsRowValueConstructorSyntaxInQuantifiedPredicates()
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax with quantified predicates.boolean
supportsRowValueConstructorSyntaxInSet()
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax, sometimes called tuple syntax, in the SET clause;protected boolean
supportsSimpleQueryGrouping()
protected boolean
supportsWithClauseInSubquery()
Whether the SQL with clause is supported within a subquery.void
visitBooleanExpressionPredicate(BooleanExpressionPredicate booleanExpressionPredicate)
void
visitCastTarget(CastTarget castTarget)
void
visitLikePredicate(LikePredicate likePredicate)
void
visitOffsetFetchClause(QueryPart queryPart)
void
visitQueryGroup(QueryGroup queryGroup)
void
visitQueryPartTableReference(QueryPartTableReference tableReference)
void
visitQuerySpec(QuerySpec querySpec)
protected void
visitRecursivePath(Expression recursivePath, int sizeEstimate)
Renders the recursive path, possibly wrapping a cast expression around it, to make sure a type with proper size is chosen.-
Methods inherited from class org.hibernate.sql.ast.spi.AbstractSqlAstTranslator
addAdditionalWherePredicate, addAppliedParameterBinding, append, append, append, appendBackslashEscapedLikeLiteral, appendSql, appendSql, appendSql, appendSql, appendSql, applyParameter, areAllResultsParameters, areAllResultsParameters, assertRowsOnlyFetchClauseType, castFunction, castNumberToString, cleanup, determineCyclePathColumnName, determineLateralEmulationPredicate, determineLockingStrategy, determineWhereClauseRestrictionWithJoinEmulation, emulateCycleClauseWithRowAndArray, emulateFetchOffsetWithWindowFunctions, emulateFetchOffsetWithWindowFunctions, emulateFetchOffsetWithWindowFunctionsVisitQueryPart, emulateQuantifiedTupleSubQueryPredicate, emulateQueryPartTableReferenceColumnAliasing, emulateSearchClauseOrderWithRowAndArray, emulateSelectTupleComparison, emulateSortSpecificationNullPrecedence, emulateSubQueryRelationalRestrictionPredicate, emulateTupleComparison, emulateValuesTableReferenceColumnAliasing, getAffectedTableNames, getAppliedParameterBindings, getArrayContainsFunction, getBooleanType, getClauseStack, getCteStatement, getCurrentClauseStack, getCurrentCteStatement, getCurrentDmlStatement, getCurrentQueryPart, getDmlTargetTableAlias, getEffectiveLockMode, getEffectiveLockMode, getEffectiveLockTimeout, getFetchClauseTypeForRowNumbering, getForUpdate, getForUpdateWithClause, getIntegerType, getJdbcLockStrategy, getJdbcParameterBindings, getJdbcServices, getLeftHandExpression, getLimit, getLimitParameter, getLockOptions, getMaxRows, getNoWait, getOffsetParameter, getParameterBinders, getParameterBindValue, getParameterRenderingMode, getQueryPartForRowNumbering, getQueryPartStack, getRowsToSkip, getSelectItemReference, getSessionFactory, getSkipLocked, getSortSpecificationsRowNumbering, getSql, getSqlAppender, getSqlBuffer, getSqlTypeName, getStatement, getStringType, getWrapperOptions, hasAggregateFunctions, hasLimit, hasLimit, hasNestedTableGroupsToRender, hasOffset, inlineCteTableGroup, inOverOrWithinGroupClause, interpretExpression, isCorrelated, isInRecursiveQueryPart, isLiteral, isParameter, isRowNumberingCurrentQueryPart, isRowsOnlyFetchClauseType, isStruct, needsCteInlining, needsLocking, needsMaxRows, needsRecursiveKeywordInWithClause, needsRowsToSkip, prepareLimitOffsetParameters, processNestedTableGroupJoins, processTableGroupJoin, processTableGroupJoins, registerAffectedTable, registerAffectedTable, render, renderAsLiteral, renderBackslashEscapedLikePattern, renderCaseInsensitiveLikeEmulation, renderCasted, renderCombinedLimitClause, renderCombinedLimitClause, renderCommaSeparated, renderCommaSeparatedSelectExpression, renderCommaSeparatedSelectExpression, renderComparisonDistinctOperator, renderComparisonEmulateCase, renderComparisonEmulateDecode, renderComparisonEmulateIntersect, renderComparisonStandard, renderCteColumns, renderCycleClause, renderDerivedTableReference, renderExpressionAsLiteral, renderExpressionsAsSubquery, renderFetch, renderFetchExpression, renderFetchPlusOffsetExpression, renderFetchPlusOffsetExpressionAsLiteral, renderFetchPlusOffsetExpressionAsSingleParameter, renderFirstClause, renderFirstClause, renderFirstSkipClause, renderFirstSkipClause, renderForUpdateClause, renderInsertIntoNoColumns, renderIntoIntoAndTable, renderLimitOffsetClause, renderLimitOffsetClause, renderLiteral, renderMaterializationHint, renderNamedTableReference, renderOffset, renderOffsetExpression, renderOffsetFetchClause, renderOffsetFetchClause, renderOrderBy, renderParameterAsParameter, renderParameterAsParameter, renderPrimaryTableReference, renderQueryGroup, renderRecursiveCteVirtualSelections, renderRootTableGroup, renderRowNumber, renderRowNumberingSelectItems, renderRowsToClause, renderRowsToClause, renderSearchClause, renderSelectExpression, renderSelectExpressionWithCastedOrInlinedPlainParameters, renderSelectSimpleComparison, renderSelectTupleComparison, renderSetClause, renderSkipFirstClause, renderSkipFirstClause, rendersTableReferenceAlias, renderStandardCycleClause, renderStandardSearchClause, renderTableGroup, renderTableGroupJoin, renderTableReferenceIdentificationVariable, renderTableReferenceJoins, renderTopClause, renderTopClause, renderTopStartAtClause, renderTopStartAtClause, renderTupleComparisonStandard, renderVirtualSelections, resolveAliasedExpression, resolveAliasedExpression, resolveExpressionToAlias, setLimitParameter, setOffsetParameter, shouldInlineCte, simpleColumnWriteFragmentRendering, supportsArrayConstructor, supportsDuplicateSelectItemsInQueryGroup, supportsFilterClause, supportsJoinInMutationStatementSubquery, supportsNestedWithClause, supportsNullPrecedence, supportsQuantifiedPredicates, supportsRecursiveClauseArrayAndRowEmulation, supportsRecursiveCycleClause, supportsRecursiveCycleUsingClause, supportsRecursiveSearchClause, supportsRowConstructor, supportsRowValueConstructorDistinctFromSyntax, supportsRowValueConstructorGtLtSyntax, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInInSubQuery, supportsWithClause, translate, translateDelete, translateInsert, translateSelect, translateUpdate, useOffsetFetchClause, visitAggregateColumnWriteExpression, visitAnsiCaseSearchedExpression, visitAnsiCaseSimpleExpression, visitAny, visitAssignment, visitBetweenPredicate, visitBinaryArithmeticExpression, visitCaseSearchedExpression, visitCaseSearchedExpression, visitCaseSimpleExpression, visitCaseSimpleExpression, visitCollation, visitColumnReference, visitColumnWriteFragment, visitConversion, visitCteContainer, visitCteDefinition, visitCustomTableDelete, visitCustomTableInsert, visitCustomTableUpdate, visitDecodeCaseSearchedExpression, visitDeleteStatement, visitDeleteStatementOnly, visitDistinct, visitDuration, visitDurationUnit, visitEntityTypeLiteral, visitEvery, visitExistsPredicate, visitExtractUnit, visitFilterFragmentPredicate, visitFilterPredicate, visitFormat, visitForUpdateClause, visitFromClause, visitFunctionTableReference, visitGroupByClause, visitGroupedPredicate, visitHavingClause, visitInArrayPredicate, visitInListPredicate, visitInsertStatement, visitInsertStatementOnly, visitInSubQueryPredicate, visitJdbcLiteral, visitJunction, visitModifiedSubQueryExpression, visitNamedTableReference, visitNegatedPredicate, visitNullnessPredicate, visitOrderBy, visitOver, visitOverClause, visitOverClause, visitOverflow, visitParameter, visitParameterAsParameter, visitPartitionByClause, visitPartitionExpressions, visitPartitionExpressions, visitQueryLiteral, visitRelationalPredicate, visitReturningColumns, visitReturningColumns, visitSelectClause, visitSelectStatement, visitSelfRenderingExpression, visitSelfRenderingPredicate, visitSetAssignment, visitSortSpecification, visitSortSpecification, visitSqlFragmentPredicate, visitSqlSelectExpression, visitSqlSelection, visitSqlSelectionExpression, visitSqlSelections, visitStandardTableDelete, visitStandardTableInsert, visitStandardTableUpdate, visitStar, visitSummarization, visitTableGroup, visitTableGroupJoin, visitTableReferenceJoin, visitTrimSpecification, visitTuple, visitUnaryOperationExpression, visitUpdateStatement, visitUpdateStatementOnly, visitValuesList, visitValuesTableReference, visitWhereClause, withParameterRenderingMode, withRowNumbering
-
-
-
-
Constructor Detail
-
MariaDBSqlAstTranslator
public MariaDBSqlAstTranslator(SessionFactoryImplementor sessionFactory, Statement statement)
-
-
Method Detail
-
supportsWithClauseInSubquery
protected boolean supportsWithClauseInSubquery()
Description copied from class:AbstractSqlAstTranslator
Whether the SQL with clause is supported within a subquery.- Overrides:
supportsWithClauseInSubquery
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderExpressionAsClauseItem
protected void renderExpressionAsClauseItem(Expression expression)
- Overrides:
renderExpressionAsClauseItem
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitRecursivePath
protected void visitRecursivePath(Expression recursivePath, int sizeEstimate)
Description copied from class:AbstractSqlAstTranslator
Renders the recursive path, possibly wrapping a cast expression around it, to make sure a type with proper size is chosen.- Overrides:
visitRecursivePath
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitBooleanExpressionPredicate
public void visitBooleanExpressionPredicate(BooleanExpressionPredicate booleanExpressionPredicate)
- Specified by:
visitBooleanExpressionPredicate
in interfaceSqlAstWalker
- Overrides:
visitBooleanExpressionPredicate
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
getForShare
protected String getForShare(int timeoutMillis)
- Overrides:
getForShare
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
shouldEmulateFetchClause
protected boolean shouldEmulateFetchClause(QueryPart queryPart)
-
supportsSimpleQueryGrouping
protected boolean supportsSimpleQueryGrouping()
- Overrides:
supportsSimpleQueryGrouping
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
shouldEmulateLateralWithIntersect
protected boolean shouldEmulateLateralWithIntersect(QueryPart queryPart)
- Overrides:
shouldEmulateLateralWithIntersect
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
supportsNestedSubqueryCorrelation
protected boolean supportsNestedSubqueryCorrelation()
- Overrides:
supportsNestedSubqueryCorrelation
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitQueryGroup
public void visitQueryGroup(QueryGroup queryGroup)
- Specified by:
visitQueryGroup
in interfaceSqlAstWalker
- Overrides:
visitQueryGroup
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitQuerySpec
public void visitQuerySpec(QuerySpec querySpec)
- Specified by:
visitQuerySpec
in interfaceSqlAstWalker
- Overrides:
visitQuerySpec
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitQueryPartTableReference
public void visitQueryPartTableReference(QueryPartTableReference tableReference)
- Specified by:
visitQueryPartTableReference
in interfaceSqlAstWalker
- Overrides:
visitQueryPartTableReference
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitOffsetFetchClause
public void visitOffsetFetchClause(QueryPart queryPart)
- Specified by:
visitOffsetFetchClause
in interfaceSqlAstWalker
- Overrides:
visitOffsetFetchClause
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderComparison
protected void renderComparison(Expression lhs, ComparisonOperator operator, Expression rhs)
- Overrides:
renderComparison
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderPartitionItem
protected void renderPartitionItem(Expression expression)
- Overrides:
renderPartitionItem
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitLikePredicate
public void visitLikePredicate(LikePredicate likePredicate)
- Specified by:
visitLikePredicate
in interfaceSqlAstWalker
- Overrides:
visitLikePredicate
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
supportsRowValueConstructorSyntaxInSet
public boolean supportsRowValueConstructorSyntaxInSet()
Description copied from class:AbstractSqlAstTranslator
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax, sometimes called tuple syntax, in the SET clause;Basically, does it support syntax like
... SET (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...
- Overrides:
supportsRowValueConstructorSyntaxInSet
in classAbstractSqlAstTranslator<T extends JdbcOperation>
- Returns:
- True if this SQL dialect is known to support "row value constructor" syntax in the SET clause; false otherwise.
-
supportsRowValueConstructorSyntaxInQuantifiedPredicates
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates()
Description copied from class:AbstractSqlAstTranslator
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax with quantified predicates.Basically, does it support syntax like
... where (FIRST_NAME, LAST_NAME) = ALL (select ...) ...
- Overrides:
supportsRowValueConstructorSyntaxInQuantifiedPredicates
in classAbstractSqlAstTranslator<T extends JdbcOperation>
- Returns:
- True if this SQL dialect is known to support "row value constructor" syntax with quantified predicates; false otherwise.
-
supportsIntersect
protected boolean supportsIntersect()
- Overrides:
supportsIntersect
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
supportsDistinctFromPredicate
protected boolean supportsDistinctFromPredicate()
Description copied from class:AbstractSqlAstTranslator
Is this SQL dialect known to support some kind of distinct from predicate.Basically, does it support syntax like
... where FIRST_NAME IS DISTINCT FROM LAST_NAME
- Overrides:
supportsDistinctFromPredicate
in classAbstractSqlAstTranslator<T extends JdbcOperation>
- Returns:
- True if this SQL dialect is known to support some kind of distinct from predicate; false otherwise
-
getFromDual
protected String getFromDual()
Description copied from class:AbstractSqlAstTranslator
Some databases require a bit of syntactic noise when there are no tables in the from clause.- Overrides:
getFromDual
in classAbstractSqlAstTranslator<T extends JdbcOperation>
- Returns:
- the SQL equivalent to Oracle's
from dual
.
-
getFromDualForSelectOnly
protected String getFromDualForSelectOnly()
- Overrides:
getFromDualForSelectOnly
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
getDialect
public MariaDBDialect getDialect()
- Overrides:
getDialect
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitCastTarget
public void visitCastTarget(CastTarget castTarget)
- Specified by:
visitCastTarget
in interfaceSqlAstWalker
- Overrides:
visitCastTarget
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
-