public override void VisitNhWithClause(NhWithClause withClause, QueryModel queryModel, int index) { var visitor = new SimplifyConditionalVisitor(); withClause.Predicate = visitor.Visit(withClause.Predicate); // Visit the predicate to build the query var expression = HqlGeneratorExpressionVisitor.Visit(withClause.Predicate, VisitorParameters).ToBooleanExpression(); _hqlTree.AddWhereClause(expression); }
public override void VisitWhereClause(WhereClause whereClause, QueryModel queryModel, int index) { var visitor = new SimplifyConditionalVisitor(); whereClause.Predicate = visitor.VisitExpression(whereClause.Predicate); // Visit the predicate to build the query var expression = HqlGeneratorExpressionTreeVisitor.Visit(whereClause.Predicate, VisitorParameters).AsBooleanExpression(); if (whereClause is NhHavingClause) { _hqlTree.AddHavingClause(expression); } else { _hqlTree.AddWhereClause(expression); } }
public override void VisitWhereClause(WhereClause whereClause, QueryModel queryModel, int index) { var visitor = new SimplifyConditionalVisitor(); whereClause.Predicate = visitor.VisitExpression(whereClause.Predicate); // Visit the predicate to build the query var expression = HqlGeneratorExpressionTreeVisitor.Visit(whereClause.Predicate, VisitorParameters).AsBooleanExpression(); if (whereClause is NhHavingClause) { _hqlTree.AddHavingClause(expression); } else { _hqlTree.AddWhereClause(expression); } }