Beispiel #1
0
 ISqlExpression?ISqlExpressionWalkable.Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
 {
     foreach (var t in Items)
     {
         t.Walk(options, context, func);
     }
     return(null);
 }
Beispiel #2
0
        public ISqlExpression Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> action)
        {
            Condition = (SqlSearchCondition)((ISqlExpressionWalkable)Condition).Walk(options, action);

            Table.Walk(options, action);

            return(null);
        }
Beispiel #3
0
 ISqlExpression ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
 {
     foreach (var t in Items)
     {
         t.Walk(options, func);
     }
     return(null);
 }
Beispiel #4
0
 protected override void Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
 {
     base.Walk(options, func);
     for (var i = 0; i < Values.Count; i++)
     {
         Values[i] = Values[i].Walk(options, func) !;
     }
 }
Beispiel #5
0
        ISqlExpression?ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            ((ISqlExpressionWalkable?)When)?.Walk(options, func);

            ((ISqlExpressionWalkable)Insert).Walk(options, func);

            return(null);
        }
Beispiel #6
0
        public ISqlExpression Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            for (var index = 0; index < Clauses.Count; index++)
            {
                Clauses[index].Walk(options, func);
            }

            return(null);
        }
Beispiel #7
0
        ISqlExpression?ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            for (var i = 0; i < Items.Count; i++)
            {
                Items[i] = Items[i].Walk(options, func) !;
            }

            return(null);
        }
Beispiel #8
0
 ISqlExpression ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
 {
     for (var i = 0; i < _infoParameters.Length; i++)
     {
         var parameter = _infoParameters[i];
         _infoParameters[i] = parameter.WithSql(parameter.Sql.Walk(options, func) !);
     }
     return(func(this));
 }
Beispiel #9
0
            protected override void Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
            {
                Expr1 = Expr1.Walk(options, func);

                if (Expr1 == null)
                {
                    throw new InvalidOperationException();
                }
            }
Beispiel #10
0
        public ISqlExpression?Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            for (var i = 0; i < Items.Count; i++)
            {
                Items[i] = Items[i].Walk(options, func) !;
            }

            return(func(this));
        }
Beispiel #11
0
        ISqlExpression ISqlExpressionWalkable.Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
        {
            foreach (var condition in Conditions)
            {
                condition.Predicate.Walk(options, context, func);
            }

            return(func(context, this));
        }
Beispiel #12
0
        ISqlExpression ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            for (var i = 0; i < Parameters.Length; i++)
            {
                Parameters[i] = Parameters[i].Walk(options, func) !;
            }

            return(func(this));
        }
Beispiel #13
0
        ISqlExpression ISqlExpressionWalkable.Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
        {
            for (var i = 0; i < Parameters.Length; i++)
            {
                Parameters[i] = Parameters[i].Walk(options, context, func) !;
            }

            return(func(context, this));
        }
Beispiel #14
0
        ISqlExpression?ISqlExpressionWalkable.Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
        {
            foreach (var table in Tables)
            {
                ((ISqlExpressionWalkable)table).Walk(options, context, func);
            }

            return(null);
        }
Beispiel #15
0
            protected override void Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
            {
                Expr1 = Expr1.Walk(options, context, func) !;

                if (Expr1 == null)
                {
                    throw new InvalidOperationException();
                }
            }
Beispiel #16
0
        ISqlExpression?ISqlExpressionWalkable.Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
        {
            for (var i = 0; i < Items.Count; i++)
            {
                Items[i] = Items[i].Walk(options, context, func) !;
            }

            return(null);
        }
        ISqlExpression ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            foreach (var condition in Conditions)
            {
                condition.Predicate.Walk(options, func);
            }

            return(func(this));
        }
Beispiel #18
0
        ISqlExpression ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            foreach (var table in Tables)
            {
                ((ISqlExpressionWalkable)table).Walk(options, func);
            }

            return(null);
        }
Beispiel #19
0
        public ISqlExpression?Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
        {
            for (var i = 0; i < Items.Count; i++)
            {
                Items[i] = Items[i].Walk(options, context, func) !;
            }

            return(func(context, this));
        }
Beispiel #20
0
        ISqlExpression?ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            ((ISqlExpressionWalkable?)Into)?.Walk(options, func);

            foreach (var t in Items)
            {
                ((ISqlExpressionWalkable)t).Walk(options, func);
            }

            return(null);
        }
        public override ISqlExpression?Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            With?.Walk(options, func);
            var newQuery = SelectQuery.Walk(options, func);

            if (!ReferenceEquals(newQuery, SelectQuery))
            {
                SelectQuery = (SelectQuery)newQuery;
            }
            return(null);
        }
Beispiel #22
0
        public override ISqlExpression?Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
        {
            Source.Walk(options, context, func);

            foreach (var insert in Inserts)
            {
                ((ISqlExpressionWalkable)insert).Walk(options, context, func);
            }

            return(null);
        }
Beispiel #23
0
        public override ISqlExpression Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            if (Parameters != null)
            {
                for (var i = 0; i < Parameters.Length; i++)
                {
                    Parameters[i] = Parameters[i].Walk(options, func);
                }
            }

            return(func(this));
        }
Beispiel #24
0
        public virtual ISqlExpression Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            if (TableArguments != null)
            {
                for (var i = 0; i < TableArguments.Length; i++)
                {
                    TableArguments[i] = TableArguments[i].Walk(options, func);
                }
            }

            return(func(this));
        }
Beispiel #25
0
        public override ISqlExpression Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
        {
            if (Parameters != null)
            {
                for (var i = 0; i < Parameters.Length; i++)
                {
                    Parameters[i] = Parameters[i].Walk(options, context, func) !;
                }
            }

            return(func(context, this));
        }
Beispiel #26
0
        public override ISqlExpression?Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
        {
            With?.Walk(options, context, func);

            var newQuery = SelectQuery.Walk(options, context, func);

            if (!ReferenceEquals(newQuery, SelectQuery))
            {
                SelectQuery = (SelectQuery)newQuery;
            }

            return(base.Walk(options, context, func));
        }
        ISqlExpression?ISqlExpressionWalkable.Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
        {
            ((ISqlExpressionWalkable?)Where)?.Walk(options, context, func);

            foreach (var t in Items)
            {
                ((ISqlExpressionWalkable)t).Walk(options, context, func);
            }

            ((ISqlExpressionWalkable?)WhereDelete)?.Walk(options, context, func);

            return(null);
        }
Beispiel #28
0
        public ISqlExpression?Walk <TContext>(WalkOptions options, TContext context, Func <TContext, ISqlExpression, ISqlExpression> func)
        {
            Condition = (SqlSearchCondition)((ISqlExpressionWalkable)Condition).Walk(options, context, func) !;

            Table.Walk(options, context, func);

            if (SqlQueryExtensions != null)
            {
                foreach (var e in SqlQueryExtensions)
                {
                    e.Walk(options, context, func);
                }
            }

            return(null);
        }
Beispiel #29
0
        ISqlExpression?ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            ((ISqlExpressionWalkable?)SourceTable)?.Walk(options, func);
            ((ISqlExpressionWalkable?)DeletedTable)?.Walk(options, func);
            ((ISqlExpressionWalkable?)InsertedTable)?.Walk(options, func);
            ((ISqlExpressionWalkable?)OutputTable)?.Walk(options, func);

            if (HasOutputItems)
            {
                foreach (var t in OutputItems)
                {
                    ((ISqlExpressionWalkable)t).Walk(options, func);
                }
            }

            return(null);
        }
Beispiel #30
0
        ISqlExpression?ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            if (Table != null)
            {
                ((ISqlExpressionWalkable)Table).Walk(options, func);
            }

            foreach (var t in Items)
            {
                ((ISqlExpressionWalkable)t).Walk(options, func);
            }

            foreach (var t in Keys)
            {
                ((ISqlExpressionWalkable)t).Walk(options, func);
            }

            return(null);
        }