public FSQueryableExpressionVisitor(FSQueryModelVisitor queryModelVisitor, IQuerySource querySource)
        {
            Guard.ArgumentNotNull(() => queryModelVisitor);

            QueryModelVisitor = queryModelVisitor;
            QuerySource       = querySource;
        }
        public static FSCommand GenerateFSQuery(QueryModel queryModel)
        {
            var visitor = new FSQueryModelVisitor();

            visitor.VisitQueryModel(queryModel);

            return(visitor.GetFSCommand());
        }
        protected override Expression VisitSubQuery(SubQueryExpression expression)
        {
            var visitor = new FSQueryModelVisitor();

            visitor.VisitQueryModel(expression.QueryModel);

            QueryParts.Merge(visitor.QueryParts);

            Offset = visitor.Offset;
            Limit  = visitor.Limit;

            IsCountQuery = visitor.IsCountQuery;

            return(visitor.Expression);
        }
예제 #4
0
 public FSCommandQueryModelVisitor(FSQueryModelVisitor queryModelVisitor)
 {
     _queryModelVisitor = queryModelVisitor;
 }