Example #1
0
 protected override Expression VisitFunction(FunctionExpression func)
 {
     if (this.linguist.Language.IsRowsAffectedExpressions(func))
     {
         return(Expression.Property(this.executor, "RowsAffected"));
     }
     return(base.VisitFunction(func));
 }
Example #2
0
 protected FunctionExpression UpdateFunction(FunctionExpression func, string name, IEnumerable <Expression> arguments)
 {
     if (name != func.Name || arguments != func.Arguments)
     {
         return(new FunctionExpression(func.Type, name, arguments));
     }
     return(func);
 }
 protected virtual Expression VisitFunction(FunctionExpression function)
 {
     this.Write("FUNCTION ");
     this.Write(function.Name);
     if (function.Arguments.Count > 0)
     {
         this.Write("(");
         this.VisitExpressionList(function.Arguments);
         this.Write(")");
     }
     return(function);
 }
Example #4
0
 protected override Expression VisitFunction(FunctionExpression func)
 {
     this.Write(func.Name);
     if (func.Arguments.Count > 0)
     {
         this.Write("(");
         for (int i = 0, n = func.Arguments.Count; i < n; i++)
         {
             if (i > 0)
             {
                 this.Write(", ");
             }
             this.Visit(func.Arguments[i]);
         }
         this.Write(")");
     }
     return(func);
 }
Example #5
0
        protected virtual Expression VisitFunction(FunctionExpression func)
        {
            var arguments = VisitExpressionList(func.Arguments);

            return(UpdateFunction(func, func.Name, arguments));
        }
Example #6
0
        /// <summary>
        /// True if the expression is a rows-affected expression.
        /// </summary>
        public virtual bool IsRowsAffectedExpressions(Expression expression)
        {
            FunctionExpression fex = expression as FunctionExpression;

            return(fex != null && fex.Name == "@@ROWCOUNT");
        }
 protected virtual bool CompareFunction(FunctionExpression x, FunctionExpression y)
 {
     return(x.Name == y.Name && this.CompareExpressionList(x.Arguments, y.Arguments));
 }