Search in sources :

Example 56 with Expression

use of org.hibernate.sql.ast.tree.expression.Expression in project hibernate-orm by hibernate.

the class BaseSqmToSqlAstConverter method transformDurationArithmetic.

private Object transformDurationArithmetic(SqmBinaryArithmetic<?> expression) {
    BinaryArithmeticOperator operator = expression.getOperator();
    // the expression tree
    switch(operator) {
        case ADD:
        case SUBTRACT:
            // the only legal binary operations involving
            // a duration with a date or timestamp are
            // addition and subtraction with the duration
            // on the right and the date or timestamp on
            // the left, producing a date or timestamp
            // 
            // ts + d or ts - d
            // 
            // the only legal binary operations involving
            // two durations are addition and subtraction,
            // producing a duration
            // 
            // d1 + d2
            // re-express addition of non-leaf duration
            // expressions to a date or timestamp as
            // addition of leaf durations to a date or
            // timestamp
            // ts + x * (d1 + d2) => (ts + x * d1) + x * d2
            // ts - x * (d1 + d2) => (ts - x * d1) - x * d2
            // ts + x * (d1 - d2) => (ts + x * d1) - x * d2
            // ts - x * (d1 - d2) => (ts - x * d1) + x * d2
            Expression timestamp = adjustedTimestamp;
            SqmExpressible<?> timestampType = adjustedTimestampType;
            adjustedTimestamp = toSqlExpression(expression.getLeftHandOperand().accept(this));
            JdbcMappingContainer type = adjustedTimestamp.getExpressionType();
            if (type instanceof SqmExpressible) {
                adjustedTimestampType = (SqmExpressible<?>) type;
            } else if (type instanceof AttributeMapping) {
                adjustedTimestampType = (SqmExpressible<?>) ((AttributeMapping) type).getMappedType();
            } else {
                // else we know it has not been transformed
                adjustedTimestampType = expression.getLeftHandOperand().getNodeType();
            }
            if (operator == SUBTRACT) {
                negativeAdjustment = !negativeAdjustment;
            }
            try {
                return expression.getRightHandOperand().accept(this);
            } finally {
                if (operator == SUBTRACT) {
                    negativeAdjustment = !negativeAdjustment;
                }
                adjustedTimestamp = timestamp;
                adjustedTimestampType = timestampType;
            }
        case MULTIPLY:
            // finally, we can multiply a duration on the
            // right by a scalar value on the left
            // scalar multiplication produces a duration
            // x * d
            // distribute scalar multiplication over the
            // terms, not forgetting the propagated scale
            // x * (d1 + d2) => x * d1 + x * d2
            // x * (d1 - d2) => x * d1 - x * d2
            // -x * (d1 + d2) => - x * d1 - x * d2
            // -x * (d1 - d2) => - x * d1 + x * d2
            Expression duration = toSqlExpression(expression.getLeftHandOperand().accept(this));
            Expression scale = adjustmentScale;
            boolean negate = negativeAdjustment;
            adjustmentScale = applyScale(duration);
            // was sucked into the scale
            negativeAdjustment = false;
            try {
                return expression.getRightHandOperand().accept(this);
            } finally {
                adjustmentScale = scale;
                negativeAdjustment = negate;
            }
        default:
            throw new SemanticException("illegal operator for a duration " + operator);
    }
}
Also used : JdbcMappingContainer(org.hibernate.metamodel.mapping.JdbcMappingContainer) SqmExpressible(org.hibernate.query.sqm.SqmExpressible) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) SqmModifiedSubQueryExpression(org.hibernate.query.sqm.tree.expression.SqmModifiedSubQueryExpression) SelfRenderingFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression) SelfRenderingAggregateFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingAggregateFunctionSqlAstExpression) CaseSearchedExpression(org.hibernate.sql.ast.tree.expression.CaseSearchedExpression) SelfRenderingSqlFragmentExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingSqlFragmentExpression) Expression(org.hibernate.sql.ast.tree.expression.Expression) SelfRenderingExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingExpression) SqmExpression(org.hibernate.query.sqm.tree.expression.SqmExpression) CaseSimpleExpression(org.hibernate.sql.ast.tree.expression.CaseSimpleExpression) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) ModifiedSubQueryExpression(org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression) BinaryArithmeticOperator(org.hibernate.query.sqm.BinaryArithmeticOperator) PluralAttributeMapping(org.hibernate.metamodel.mapping.PluralAttributeMapping) ToOneAttributeMapping(org.hibernate.metamodel.mapping.internal.ToOneAttributeMapping) AttributeMapping(org.hibernate.metamodel.mapping.AttributeMapping) SemanticException(org.hibernate.query.SemanticException)

Example 57 with Expression

use of org.hibernate.sql.ast.tree.expression.Expression in project hibernate-orm by hibernate.

the class BaseSqmToSqlAstConverter method resolveGroupOrOrderByExpression.

protected Expression resolveGroupOrOrderByExpression(SqmExpression<?> groupByClauseExpression) {
    final int sqmPosition;
    if (groupByClauseExpression instanceof SqmAliasedNodeRef) {
        final int aliasedNodeOrdinal = ((SqmAliasedNodeRef) groupByClauseExpression).getPosition();
        sqmPosition = aliasedNodeOrdinal - 1;
    } else if (statement.getQuerySource() == SqmQuerySource.CRITERIA) {
        // In JPA Criteria we could be using the same expression object for the group/order by and select item
        // We try to find the select item position for this expression here which is not necessarily just an optimization.
        // This is vital to enable the support for parameters in these expressions.
        // Databases usually don't know if a parameter marker will have the same value as another parameter marker
        // and due to that, a database usually complains when seeing something like
        // `select ?, count(*) from dual group by ?` saying that there is a missing group by for the first `?`
        // To avoid this issue, we determine the position and let the SqlAstTranslator handle the rest.
        // Usually it will render `select ?, count(*) from dual group by 1` if supported
        // or force rendering the parameter as literal instead so that the database can see the grouping is fine
        final SqmQuerySpec<?> querySpec = currentSqmQueryPart.getFirstQuerySpec();
        sqmPosition = indexOfExpression(querySpec.getSelectClause().getSelections(), groupByClauseExpression);
    } else {
        sqmPosition = -1;
    }
    if (sqmPosition != -1) {
        final List<SqlSelection> selections = currentSqlSelectionCollector().getSelections(sqmPosition);
        assert selections != null : String.format(Locale.ROOT, "No SqlSelections for SQM position `%s`", sqmPosition);
        final List<Expression> expressions = new ArrayList<>(selections.size());
        OUTER: for (int i = 0; i < selections.size(); i++) {
            final SqlSelection selection = selections.get(i);
            // which is, just like the identifier itself, also registered as selection
            for (int j = 0; j < i; j++) {
                if (selections.get(j) == selection) {
                    continue OUTER;
                }
            }
            if (currentSqmQueryPart instanceof SqmQueryGroup<?>) {
                // Reusing the SqlSelection for query groups would be wrong because the aliases do no exist
                // So we have to use a literal expression in a new SqlSelection instance to refer to the position
                expressions.add(new SqlSelectionExpression(new SqlSelectionImpl(selection.getJdbcResultSetIndex(), selection.getValuesArrayPosition(), new QueryLiteral<>(selection.getValuesArrayPosition(), basicType(Integer.class)))));
            } else {
                expressions.add(new SqlSelectionExpression(selection));
            }
        }
        if (expressions.size() == 1) {
            return expressions.get(0);
        }
        return new SqlTuple(expressions, null);
    }
    return (Expression) groupByClauseExpression.accept(this);
}
Also used : SqmAliasedNodeRef(org.hibernate.query.sqm.tree.expression.SqmAliasedNodeRef) ArrayList(java.util.ArrayList) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) SqlSelection(org.hibernate.sql.ast.spi.SqlSelection) BigInteger(java.math.BigInteger) QueryLiteral(org.hibernate.sql.ast.tree.expression.QueryLiteral) ConvertedQueryLiteral(org.hibernate.sql.ast.tree.expression.ConvertedQueryLiteral) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) SqmModifiedSubQueryExpression(org.hibernate.query.sqm.tree.expression.SqmModifiedSubQueryExpression) SelfRenderingFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression) SelfRenderingAggregateFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingAggregateFunctionSqlAstExpression) CaseSearchedExpression(org.hibernate.sql.ast.tree.expression.CaseSearchedExpression) SelfRenderingSqlFragmentExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingSqlFragmentExpression) Expression(org.hibernate.sql.ast.tree.expression.Expression) SelfRenderingExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingExpression) SqmExpression(org.hibernate.query.sqm.tree.expression.SqmExpression) CaseSimpleExpression(org.hibernate.sql.ast.tree.expression.CaseSimpleExpression) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) ModifiedSubQueryExpression(org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression) SqlTuple(org.hibernate.sql.ast.tree.expression.SqlTuple) SqlSelectionImpl(org.hibernate.sql.results.internal.SqlSelectionImpl) SqmQuerySpec(org.hibernate.query.sqm.tree.select.SqmQuerySpec)

Example 58 with Expression

use of org.hibernate.sql.ast.tree.expression.Expression in project hibernate-orm by hibernate.

the class BaseSqmToSqlAstConverter method visitMemberOfPredicate.

@Override
public Predicate visitMemberOfPredicate(SqmMemberOfPredicate predicate) {
    final SqmPath<?> pluralPath = predicate.getPluralPath();
    prepareReusablePath(pluralPath, () -> null);
    final PluralAttributeMapping pluralAttributeMapping = (PluralAttributeMapping) determineValueMapping(pluralPath);
    if (pluralAttributeMapping.getElementDescriptor() instanceof EntityCollectionPart) {
        inferrableTypeAccessStack.push(() -> ((EntityCollectionPart) pluralAttributeMapping.getElementDescriptor()).getKeyTargetMatchPart());
    } else if (pluralAttributeMapping.getElementDescriptor() instanceof EmbeddedCollectionPart) {
        inferrableTypeAccessStack.push(pluralAttributeMapping::getElementDescriptor);
    } else {
        inferrableTypeAccessStack.push(() -> pluralAttributeMapping);
    }
    final Expression lhs;
    try {
        lhs = (Expression) predicate.getLeftHandExpression().accept(this);
    } finally {
        inferrableTypeAccessStack.pop();
    }
    final FromClauseAccess parentFromClauseAccess = getFromClauseAccess();
    final QuerySpec subQuerySpec = new QuerySpec(false);
    pushProcessingState(new SqlAstQueryPartProcessingStateImpl(subQuerySpec, getCurrentProcessingState(), this, currentClauseStack::getCurrent, false));
    try {
        final TableGroup tableGroup = pluralAttributeMapping.createRootTableGroup(true, pluralPath.getNavigablePath(), null, () -> subQuerySpec::applyPredicate, this, creationContext);
        pluralAttributeMapping.applyBaseRestrictions(subQuerySpec::applyPredicate, tableGroup, true, getLoadQueryInfluencers().getEnabledFilters(), null, this);
        getFromClauseAccess().registerTableGroup(pluralPath.getNavigablePath(), tableGroup);
        registerPluralTableGroupParts(tableGroup);
        subQuerySpec.getFromClause().addRoot(tableGroup);
        final CollectionPart elementDescriptor = pluralAttributeMapping.getElementDescriptor();
        if (elementDescriptor instanceof EntityCollectionPart) {
            ((EntityCollectionPart) elementDescriptor).getKeyTargetMatchPart().createDomainResult(pluralPath.getNavigablePath(), tableGroup, null, this);
        } else {
            elementDescriptor.createDomainResult(pluralPath.getNavigablePath(), tableGroup, null, this);
        }
        subQuerySpec.applyPredicate(pluralAttributeMapping.getKeyDescriptor().generateJoinPredicate(parentFromClauseAccess.findTableGroup(pluralPath.getNavigablePath().getParent()), tableGroup, getSqlExpressionResolver(), creationContext));
    } finally {
        popProcessingStateStack();
    }
    return new InSubQueryPredicate(lhs, subQuerySpec, predicate.isNegated(), getBooleanType());
}
Also used : SqlAstQueryPartProcessingStateImpl(org.hibernate.query.sqm.sql.internal.SqlAstQueryPartProcessingStateImpl) EntityCollectionPart(org.hibernate.metamodel.mapping.internal.EntityCollectionPart) VirtualTableGroup(org.hibernate.sql.ast.tree.from.VirtualTableGroup) LazyTableGroup(org.hibernate.sql.ast.tree.from.LazyTableGroup) TableGroup(org.hibernate.sql.ast.tree.from.TableGroup) CorrelatedTableGroup(org.hibernate.sql.ast.tree.from.CorrelatedTableGroup) CorrelatedPluralTableGroup(org.hibernate.sql.ast.tree.from.CorrelatedPluralTableGroup) PluralTableGroup(org.hibernate.sql.ast.tree.from.PluralTableGroup) QueryPartTableGroup(org.hibernate.sql.ast.tree.from.QueryPartTableGroup) EmbeddedCollectionPart(org.hibernate.metamodel.mapping.internal.EmbeddedCollectionPart) FromClauseAccess(org.hibernate.sql.ast.spi.FromClauseAccess) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) SqmModifiedSubQueryExpression(org.hibernate.query.sqm.tree.expression.SqmModifiedSubQueryExpression) SelfRenderingFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression) SelfRenderingAggregateFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingAggregateFunctionSqlAstExpression) CaseSearchedExpression(org.hibernate.sql.ast.tree.expression.CaseSearchedExpression) SelfRenderingSqlFragmentExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingSqlFragmentExpression) Expression(org.hibernate.sql.ast.tree.expression.Expression) SelfRenderingExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingExpression) SqmExpression(org.hibernate.query.sqm.tree.expression.SqmExpression) CaseSimpleExpression(org.hibernate.sql.ast.tree.expression.CaseSimpleExpression) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) ModifiedSubQueryExpression(org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression) InSubQueryPredicate(org.hibernate.sql.ast.tree.predicate.InSubQueryPredicate) SqmInSubQueryPredicate(org.hibernate.query.sqm.tree.predicate.SqmInSubQueryPredicate) PluralAttributeMapping(org.hibernate.metamodel.mapping.PluralAttributeMapping) SqmQuerySpec(org.hibernate.query.sqm.tree.select.SqmQuerySpec) QuerySpec(org.hibernate.sql.ast.tree.select.QuerySpec) EntityCollectionPart(org.hibernate.metamodel.mapping.internal.EntityCollectionPart) CollectionPart(org.hibernate.metamodel.mapping.CollectionPart) EmbeddedCollectionPart(org.hibernate.metamodel.mapping.internal.EmbeddedCollectionPart)

Example 59 with Expression

use of org.hibernate.sql.ast.tree.expression.Expression in project hibernate-orm by hibernate.

the class BaseSqmToSqlAstConverter method addVersionedAssignment.

public void addVersionedAssignment(Consumer<Assignment> assignmentConsumer, SqmUpdateStatement<?> sqmStatement) {
    if (!sqmStatement.isVersioned()) {
        return;
    }
    final EntityPersister persister = creationContext.getSessionFactory().getRuntimeMetamodels().getMappingMetamodel().findEntityDescriptor(sqmStatement.getTarget().getEntityName());
    if (!persister.isVersioned()) {
        throw new SemanticException("increment option specified for update of non-versioned entity");
    }
    final BasicType<?> versionType = persister.getVersionType();
    if (versionType instanceof UserVersionType) {
        throw new SemanticException("user-defined version types not supported for increment option");
    }
    final EntityVersionMapping versionMapping = persister.getVersionMapping();
    final List<ColumnReference> targetColumnReferences = BasicValuedPathInterpretation.from((SqmBasicValuedSimplePath<?>) sqmStatement.getRoot().get(versionMapping.getPartName()), this, this, jpaQueryComplianceEnabled).getColumnReferences();
    assert targetColumnReferences.size() == 1;
    final ColumnReference versionColumn = targetColumnReferences.get(0);
    final Expression value;
    if (versionMapping.getJdbcMapping().getJdbcType().isTemporal()) {
        value = new VersionTypeSeedParameterSpecification(versionType, persister.getVersionJavaType());
    } else {
        value = new BinaryArithmeticExpression(versionColumn, ADD, new QueryLiteral<>(1, versionType), versionType);
    }
    assignmentConsumer.accept(new Assignment(versionColumn, value));
}
Also used : EntityPersister(org.hibernate.persister.entity.EntityPersister) SingleTableEntityPersister(org.hibernate.persister.entity.SingleTableEntityPersister) AbstractEntityPersister(org.hibernate.persister.entity.AbstractEntityPersister) UserVersionType(org.hibernate.usertype.UserVersionType) VersionTypeSeedParameterSpecification(org.hibernate.sql.exec.internal.VersionTypeSeedParameterSpecification) SqmBasicValuedSimplePath(org.hibernate.query.sqm.tree.domain.SqmBasicValuedSimplePath) Assignment(org.hibernate.sql.ast.tree.update.Assignment) SqmAssignment(org.hibernate.query.sqm.tree.update.SqmAssignment) QueryLiteral(org.hibernate.sql.ast.tree.expression.QueryLiteral) ConvertedQueryLiteral(org.hibernate.sql.ast.tree.expression.ConvertedQueryLiteral) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) SqmModifiedSubQueryExpression(org.hibernate.query.sqm.tree.expression.SqmModifiedSubQueryExpression) SelfRenderingFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression) SelfRenderingAggregateFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingAggregateFunctionSqlAstExpression) CaseSearchedExpression(org.hibernate.sql.ast.tree.expression.CaseSearchedExpression) SelfRenderingSqlFragmentExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingSqlFragmentExpression) Expression(org.hibernate.sql.ast.tree.expression.Expression) SelfRenderingExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingExpression) SqmExpression(org.hibernate.query.sqm.tree.expression.SqmExpression) CaseSimpleExpression(org.hibernate.sql.ast.tree.expression.CaseSimpleExpression) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) ModifiedSubQueryExpression(org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) EntityVersionMapping(org.hibernate.metamodel.mapping.EntityVersionMapping) SemanticException(org.hibernate.query.SemanticException) ColumnReference(org.hibernate.sql.ast.tree.expression.ColumnReference)

Example 60 with Expression

use of org.hibernate.sql.ast.tree.expression.Expression in project hibernate-orm by hibernate.

the class BaseSqmToSqlAstConverter method visitSetClause.

@Override
public List<Assignment> visitSetClause(SqmSetClause setClause) {
    final List<Assignment> assignments = new ArrayList<>(setClause.getAssignments().size());
    for (SqmAssignment sqmAssignment : setClause.getAssignments()) {
        final List<ColumnReference> targetColumnReferences = new ArrayList<>();
        pushProcessingState(new SqlAstProcessingStateImpl(getCurrentProcessingState(), this, getCurrentClauseStack()::getCurrent) {

            @Override
            public Expression resolveSqlExpression(String key, Function<SqlAstProcessingState, Expression> creator) {
                final Expression expression = getParentState().getSqlExpressionResolver().resolveSqlExpression(key, creator);
                assert expression instanceof ColumnReference;
                targetColumnReferences.add((ColumnReference) expression);
                return expression;
            }
        }, getFromClauseIndex());
        final SqmPathInterpretation<?> assignedPathInterpretation;
        try {
            assignedPathInterpretation = (SqmPathInterpretation<?>) sqmAssignment.getTargetPath().accept(this);
        } finally {
            popProcessingStateStack();
        }
        inferrableTypeAccessStack.push(assignedPathInterpretation::getExpressionType);
        // final List<ColumnReference> valueColumnReferences = new ArrayList<>();
        pushProcessingState(new SqlAstProcessingStateImpl(getCurrentProcessingState(), this, getCurrentClauseStack()::getCurrent) {

            @Override
            public Expression resolveSqlExpression(String key, Function<SqlAstProcessingState, Expression> creator) {
                final Expression expression = getParentState().getSqlExpressionResolver().resolveSqlExpression(key, creator);
                assert expression instanceof ColumnReference;
                // valueColumnReferences.add( (ColumnReference) expression );
                return expression;
            }
        }, getFromClauseIndex());
        try {
            final SqmExpression<?> assignmentValue = sqmAssignment.getValue();
            final SqmParameter<?> assignmentValueParameter = getSqmParameter(assignmentValue);
            if (assignmentValueParameter != null) {
                consumeSqmParameter(assignmentValueParameter, assignedPathInterpretation.getExpressionType(), (index, jdbcParameter) -> assignments.add(new Assignment(targetColumnReferences.get(index), jdbcParameter)));
            } else {
                final Expression valueExpression = (Expression) assignmentValue.accept(this);
                final int valueExprJdbcCount = getKeyExpressible(valueExpression.getExpressionType()).getJdbcTypeCount();
                final int assignedPathJdbcCount = getKeyExpressible(assignedPathInterpretation.getExpressionType()).getJdbcTypeCount();
                if (valueExprJdbcCount != assignedPathJdbcCount) {
                    SqlTreeCreationLogger.LOGGER.debugf("JDBC type count does not match in UPDATE assignment between the assigned-path and the assigned-value; " + "this will likely lead to problems executing the query");
                }
                assert assignedPathJdbcCount == valueExprJdbcCount;
                for (ColumnReference columnReference : targetColumnReferences) {
                    assignments.add(new Assignment(columnReference, valueExpression));
                }
            }
        } finally {
            popProcessingStateStack();
            inferrableTypeAccessStack.pop();
        }
    }
    return assignments;
}
Also used : ArrayList(java.util.ArrayList) SqlAstProcessingStateImpl(org.hibernate.query.sqm.sql.internal.SqlAstProcessingStateImpl) Assignment(org.hibernate.sql.ast.tree.update.Assignment) SqmAssignment(org.hibernate.query.sqm.tree.update.SqmAssignment) SqlAstProcessingState(org.hibernate.sql.ast.spi.SqlAstProcessingState) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) SqmModifiedSubQueryExpression(org.hibernate.query.sqm.tree.expression.SqmModifiedSubQueryExpression) SelfRenderingFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression) SelfRenderingAggregateFunctionSqlAstExpression(org.hibernate.query.sqm.function.SelfRenderingAggregateFunctionSqlAstExpression) CaseSearchedExpression(org.hibernate.sql.ast.tree.expression.CaseSearchedExpression) SelfRenderingSqlFragmentExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingSqlFragmentExpression) Expression(org.hibernate.sql.ast.tree.expression.Expression) SelfRenderingExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingExpression) SqmExpression(org.hibernate.query.sqm.tree.expression.SqmExpression) CaseSimpleExpression(org.hibernate.sql.ast.tree.expression.CaseSimpleExpression) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) ModifiedSubQueryExpression(org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression) SqmAssignment(org.hibernate.query.sqm.tree.update.SqmAssignment) ColumnReference(org.hibernate.sql.ast.tree.expression.ColumnReference)

Aggregations

Expression (org.hibernate.sql.ast.tree.expression.Expression)130 CaseSearchedExpression (org.hibernate.sql.ast.tree.expression.CaseSearchedExpression)68 CaseSimpleExpression (org.hibernate.sql.ast.tree.expression.CaseSimpleExpression)67 BinaryArithmeticExpression (org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression)62 SqlSelectionExpression (org.hibernate.sql.ast.tree.expression.SqlSelectionExpression)57 ModifiedSubQueryExpression (org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression)54 SelfRenderingExpression (org.hibernate.sql.ast.tree.expression.SelfRenderingExpression)54 ColumnReference (org.hibernate.sql.ast.tree.expression.ColumnReference)42 SelfRenderingFunctionSqlAstExpression (org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression)37 SqlTuple (org.hibernate.sql.ast.tree.expression.SqlTuple)35 SqmExpression (org.hibernate.query.sqm.tree.expression.SqmExpression)34 SelfRenderingSqlFragmentExpression (org.hibernate.sql.ast.tree.expression.SelfRenderingSqlFragmentExpression)33 SelfRenderingAggregateFunctionSqlAstExpression (org.hibernate.query.sqm.function.SelfRenderingAggregateFunctionSqlAstExpression)32 ArrayList (java.util.ArrayList)31 SqmModifiedSubQueryExpression (org.hibernate.query.sqm.tree.expression.SqmModifiedSubQueryExpression)31 TableGroup (org.hibernate.sql.ast.tree.from.TableGroup)28 TableReference (org.hibernate.sql.ast.tree.from.TableReference)25 SessionFactoryImplementor (org.hibernate.engine.spi.SessionFactoryImplementor)23 ComparisonPredicate (org.hibernate.sql.ast.tree.predicate.ComparisonPredicate)23 NavigablePath (org.hibernate.query.spi.NavigablePath)21