Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
        public ISqlExpression Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> action)
        {
            Condition = (SqlSearchCondition)((ISqlExpressionWalkable)Condition).Walk(options, action);

            Table.Walk(options, action);

            return(null);
        }
Ejemplo n.º 3
0
 ISqlExpression ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
 {
     foreach (var t in Items)
     {
         t.Walk(options, func);
     }
     return(null);
 }
Ejemplo n.º 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) !;
     }
 }
Ejemplo n.º 5
0
        ISqlExpression?ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            ((ISqlExpressionWalkable?)When)?.Walk(options, func);

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

            return(null);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
 }
Ejemplo n.º 9
0
            protected override void Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
            {
                Expr1 = Expr1.Walk(options, func);

                if (Expr1 == null)
                {
                    throw new InvalidOperationException();
                }
            }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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();
                }
            }
Ejemplo n.º 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);
        }
Ejemplo n.º 17
0
        ISqlExpression ISqlExpressionWalkable.Walk(WalkOptions options, Func <ISqlExpression, ISqlExpression> func)
        {
            foreach (var condition in Conditions)
            {
                condition.Predicate.Walk(options, func);
            }

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

            return(null);
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 21
0
        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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 27
0
        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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }