public async Task <IList <T> > ToListAsync() { Enumerator e = this.enumerator; SqoQuery <TOuter> SqoQueryOuterImp = SqoQueryOuter as SqoQuery <TOuter>; SqoQuery <TInner> SqoQueryInnerImp = SqoQueryInner as SqoQuery <TInner>; if (SqoQueryOuterImp != null) { List <KeyValuePair <int, int> > oids = await SqoQueryOuterImp.Siaqodb.LoadOidsForJoinAsync <T, TOuter, TInner>(SqoQueryOuterImp, SqoQueryInnerImp, outerExpression, innerExpression); e.oids = oids; e.siaqodb = SqoQueryOuterImp.Siaqodb; e.outerType = typeof(TOuter); e.innerType = typeof(TInner); List <T> list = new List <T>(); while (e.MoveNext()) { list.Add(e.Current); } return(list); } else { throw new LINQUnoptimizeException("cannot optimize"); } //this.enumerator = null; }
public IEnumerator <T> GetEnumerator() { Enumerator e = this.enumerator; SqoQuery <TOuter> SqoQueryOuterImp = SqoQueryOuter as SqoQuery <TOuter>; SqoQuery <TInner> SqoQueryInnerImp = SqoQueryInner as SqoQuery <TInner>; if (SqoQueryOuterImp != null) { List <KeyValuePair <int, int> > oids = SqoQueryOuterImp.Siaqodb.LoadOidsForJoin <T, TOuter, TInner>(SqoQueryOuterImp, SqoQueryInnerImp, outerExpression, innerExpression); e.oids = oids; e.siaqodb = SqoQueryOuterImp.Siaqodb; e.outerType = typeof(TOuter); e.innerType = typeof(TInner); } else { throw new LINQUnoptimizeException("cannot optimize"); } //this.enumerator = null; return(e); }
public ProjectionSelectReader(List <SqoColumn> columns, Func <ProjectionRow, T> projector, SqoQuery <TSource> query) { this.enumerator = new EnumeratorSelect <T>(columns, projector); this.query = query; }
public IncludeSqoQuery(SqoQuery <T> query, params string[] properties) { this.originalQuery = query; includes.AddRange(properties); }