internal JoinBigQueryable(
            IBigQueryable parent,
            InternalJoinType joinType,
            string joinTableName,
            IExecutableBigQueryable <TInner> joinTable,
            IFlattenBigQueryable <TInner> joinFlattenTable,
            Expression <Func <TOuter, TInner, TResult> > aliasSelector,
            Expression <Func <TResult, bool> > joinCondition)
            : base(parent)
        {
            this.joinType         = joinType;
            this.joinTableName    = joinTableName;
            this.joinFlattenTable = joinFlattenTable as FlattenBigQueryable <TInner>;
            var sub = joinTable as SubqueryBigQueryable <TInner>;

            if (sub != null)
            {
                this.joinTable = sub;
            }
            else if (joinTable != null)
            {
                this.joinTable = joinTable.Into() as SubqueryBigQueryable <TInner>;
            }
            this.aliasSelector = aliasSelector;
            this.joinCondition = joinCondition;
        }
Пример #2
0
        public static IJoinBigQueryable <TResult> Join <TOuter, TInner, TResult>(this IJoinBigQueryable <TOuter> source,
                                                                                 IExecutableBigQueryable <TInner> joinTable,
                                                                                 Expression <Func <TOuter, TInner, TResult> > aliasSelector,
                                                                                 Expression <Func <TResult, bool> > joinCondition)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            return(new JoinBigQueryable <TOuter, TInner, TResult>(source, InternalJoinType.Inner, null, joinTable, null, aliasSelector, joinCondition));
        }
Пример #3
0
 public ISubqueryBigQueryable <T> From <T>(IExecutableBigQueryable <T> nestedSource, params IExecutableBigQueryable <T>[] unionSources)
 {
     return(new SubqueryBigQueryable <T>(new[] { nestedSource }.Concat(unionSources).ToArray()));
 }
 public static bool In <T, TExpr>(T expr, IExecutableBigQueryable <TExpr> exprs)
 {
     throw Invalid();
 }
 public static string ToFlatSql <T>(this IExecutableBigQueryable <T> q)
 {
     return(q.ToString().TrimFlat());
 }
Пример #6
0
        public static IJoinBigQueryable <TResult> JoinCross <TOuter, TInner, TResult>(this IJoinBigQueryable <TOuter> source,
                                                                                      IExecutableBigQueryable <TInner> joinTable,
                                                                                      Expression <Func <TOuter, TInner, TResult> > aliasSelector,
                                                                                      bool each = false)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            return(new JoinBigQueryable <TOuter, TInner, TResult>(source, (each ? InternalJoinType.CrossEach : InternalJoinType.Cross), null, joinTable, null, aliasSelector, null));
        }