Ejemplo n.º 1
0
        public static SelectSubqueryData Create(QueryParts parts, SubqueryParts subquery)
        {
            Contract.Requires(parts != null);
            Contract.Requires(subquery != null);

            var selects = new List<KeyValuePair<IQuerySource, Func<object, object>>>();
            foreach (var s in subquery.Selects)
            {
                var factory = QuerySourceConverterFactory.Create(s.QuerySource, parts);
                selects.Add(new KeyValuePair<IQuerySource, Func<object, object>>(factory.QuerySource, factory.Instancer));
            }

            return new SelectSubqueryData(selects);
        }
Ejemplo n.º 2
0
        public SubqueryParts(QueryParts parentQuery, bool canQueryInMemory, Expression selector, string contextName, QueryContext context)
            : base(parentQuery.Locator,
				contextName,
				parentQuery.ConverterFactory,
				parentQuery.Parameters,
				context,
				parentQuery.Simplifications,
				parentQuery.ExpressionMatchers,
				parentQuery.MemberMatchers,
				parentQuery.ProjectionMatchers)
        {
            this.CanQueryInMemory = canQueryInMemory;
            this.ParentQuery = parentQuery;
            this.Selector = selector;
        }
Ejemplo n.º 3
0
 public SubqueryParts(QueryParts parentQuery, Expression selector, string contextName, QueryContext context)
     : this(parentQuery, false, selector, contextName, context)
 {
 }
 public static SubqueryParts ParseSubquery(QueryModel queryModel, QueryParts parentQuery, bool canQueryInMemory, string contextName, QueryContext context)
 {
     var visitor = new SubqueryGeneratorQueryModelVisitor(parentQuery, canQueryInMemory, queryModel.SelectClause.Selector, contextName, context);
     visitor.VisitQueryModel(queryModel);
     return visitor.QueryParts;
 }
 public static SubqueryParts ParseSubquery(QueryModel queryModel, QueryParts parentQuery, string contextName, QueryContext context)
 {
     return ParseSubquery(queryModel, parentQuery, false, contextName, context);
 }
 private SubqueryGeneratorQueryModelVisitor(QueryParts parentQuery, bool canQueryInMemory, Expression selector, string contextName, QueryContext context)
 {
     QueryParts = new SubqueryParts(parentQuery, canQueryInMemory, selector, contextName, context);
 }