public override void Visit(WhereClause node) { var childBinaryExpressionVisitor = new ChildPredicateExpressionVisitor(); node.Accept(childBinaryExpressionVisitor); multiClauseQuery = childBinaryExpressionVisitor.PredicatesFound; var childVisitor = new ChildFunctionCallVisitor(ChildCallback, multiClauseQuery); node.Accept(childVisitor); }
public override void Visit(WhereClause node) { var predicateExpressionVisitor = new PredicateVisitor(); node.Accept(predicateExpressionVisitor); multiClauseQuery = predicateExpressionVisitor.PredicatesFound; var childVisitor = new FunctionVisitor(VisitorCallback, multiClauseQuery); node.Accept(childVisitor); }
public override void AcceptChildren(WSqlFragmentVisitor visitor) { if (FromClause != null) { FromClause.Accept(visitor); } if (WhereClause != null) { WhereClause.Accept(visitor); } if (TopRowFilter != null) { TopRowFilter.Accept(visitor); } if (GroupByClause != null) { GroupByClause.Accept(visitor); } if (HavingClause != null) { HavingClause.Accept(visitor); } if (SelectElements != null) { var index = 0; for (var count = SelectElements.Count; index < count; ++index) { SelectElements[index].Accept(visitor); } } base.AcceptChildren(visitor); }
public void TestWhereClauseAccept() { Mock <KoraliumSqlVisitor> mock = new Mock <KoraliumSqlVisitor>(); WhereClause whereClause = new WhereClause(); whereClause.Accept(mock.Object); mock.Verify(x => x.VisitWhereClause(whereClause)); }
public void Accept() { var queryModel = ExpressionHelper.CreateQueryModel <Cook> (); var repository = new MockRepository(); var visitorMock = repository.StrictMock <IQueryModelVisitor> (); visitorMock.VisitWhereClause(_whereClause, queryModel, 1); repository.ReplayAll(); _whereClause.Accept(visitorMock, queryModel, 1); repository.VerifyAll(); }
public static WhereStage GetWhereStage( IQueryStage previousStage, WhereClause whereClause, VisitorMetadata visitorMetadata, HashSet <PropertyInfo> usedProperties) { WhereVisitor whereVisitor = new WhereVisitor(previousStage, visitorMetadata); whereClause.Accept(whereVisitor); foreach (var property in whereVisitor.UsedProperties) { usedProperties.Add(property); } return(new WhereStage( previousStage.TypeInfo, previousStage.ParameterExpression, whereVisitor.Expression, previousStage.CurrentType, previousStage.FromAliases, whereVisitor.ContainsFullTextSearch )); }
public override void Visit(WhereClause node) { var childVisitor = new ChildFunctionCallVisitor(ChildCallback); node.Accept(childVisitor); }