コード例 #1
0
 public override Expression Visit(DbInExpression expression)
 {
     throw new NotImplementedException(
         string.Format(
             ExceptionMessages.DbExpressionTransformationNotImplemented,
             typeof(DbInExpression).Name));
 }
コード例 #2
0
            public override TreeNode Visit(DbInExpression e)
            {
                Check.NotNull(e, "e");

                const string inString = "In";
                TreeNode     retInfo;

                if (_infix)
                {
                    retInfo = new TreeNode(String.Empty);
                    retInfo.Children.Add(VisitExpression(e.Item));
                    retInfo.Children.Add(new TreeNode(inString));
                }
                else
                {
                    retInfo = new TreeNode(inString);
                    retInfo.Children.Add(VisitExpression(e.Item));
                }

                foreach (var item in e.List)
                {
                    retInfo.Children.Add(VisitExpression(item));
                }

                return(retInfo);
            }
コード例 #3
0
 protected override Expression VisitIn(DbInExpression @in)
 {
     this.VisitValue(@in.Expression);
     this.Write(" IN (");
     if (@in.Select != null)
     {
         this.WriteLine(Indentation.Inner);
         this.Visit(@in.Select);
         this.WriteLine(Indentation.Same);
         this.Write(")");
         this.Indent(Indentation.Outer);
     }
     else if (@in.Values != null)
     {
         for (int i = 0, n = @in.Values.Count; i < n; i++)
         {
             if (i > 0)
             {
                 this.Write(", ");
             }
             this.VisitValue(@in.Values[i]);
         }
         this.Write(")");
     }
     return(@in);
 }
コード例 #4
0
        public override void Visit(DbInExpression e)
        {
            Check.NotNull(e, "e");

            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            e.Item.Accept(this);
            _key.Append(",(");

            var first = true;

            foreach (var item in e.List)
            {
                if (first)
                {
                    first = false;
                }
                else
                {
                    _key.Append(',');
                }

                item.Accept(this);
            }

            _key.Append("))");
        }
コード例 #5
0
 public override Expression Visit(DbInExpression expression)
 {
     throw new NotImplementedException(
               string.Format(
                   ExceptionMessages.DbExpressionTransformationNotImplemented,
                   typeof(DbInExpression).Name));
 }
コード例 #6
0
 public override void Visit(DbInExpression e)
 {
     Check.NotNull <DbInExpression>(e, nameof(e));
     this.Begin((DbExpression)e);
     this.Dump(e.Item);
     this.Dump((IEnumerable <DbExpression>)e.List, "List", "Item");
     this.End((DbExpression)e);
 }
コード例 #7
0
        public override void Visit(DbInExpression e)
        {
            Check.NotNull(e, "e");

            Begin(e);
            Dump(e.Item);
            Dump(e.List, "List", "Item");
            End(e);
        }
コード例 #8
0
 public override bool Visit(DbInExpression expression)
 {
     Check.NotNull <DbInExpression>(expression, nameof(expression));
     if (!this.VisitExpression(expression.Item))
     {
         return(this.VisitExpressionList(expression.List));
     }
     return(true);
 }
コード例 #9
0
        public override SqlFragment Visit(DbInExpression expression)
        {
            SqlFragment sf  = expression.Item.Accept(this);
            InFragment  inf = new InFragment();

            inf.Argument = sf;
            for (int i = 0; i < expression.List.Count; i++)
            {
                LiteralFragment lf = Visit(expression.List[i] as DbConstantExpression) as LiteralFragment;
                inf.InList.Add(lf);
            }
            return(inf);
        }
コード例 #10
0
        public override SqlFragment Visit(DbInExpression expression)
        {
            ColumnFragment cf  = Visit(expression.Item as DbPropertyExpression) as ColumnFragment;
            InFragment     inf = new InFragment();

            inf.Argument = cf;
            for (int i = 0; i < expression.List.Count; i++)
            {
                LiteralFragment lf = Visit(expression.List[i] as DbConstantExpression) as LiteralFragment;
                inf.InList.Add(lf);
            }
            return(inf);
        }
コード例 #11
0
            public override TreeNode Visit(DbInExpression e)
            {
                Check.NotNull <DbInExpression>(e, nameof(e));
                TreeNode treeNode;

                if (this._infix)
                {
                    treeNode = new TreeNode(string.Empty, new TreeNode[0]);
                    treeNode.Children.Add(this.VisitExpression(e.Item));
                    treeNode.Children.Add(new TreeNode("In", new TreeNode[0]));
                }
                else
                {
                    treeNode = new TreeNode("In", new TreeNode[0]);
                    treeNode.Children.Add(this.VisitExpression(e.Item));
                }
                foreach (DbExpression expr in (IEnumerable <DbExpression>)e.List)
                {
                    treeNode.Children.Add(this.VisitExpression(expr));
                }
                return(treeNode);
            }
コード例 #12
0
        public override void Visit(DbInExpression e)
        {
            Check.NotNull <DbInExpression>(e, nameof(e));
            this.VisitExprKind(e.ExpressionKind);
            this._key.Append('(');
            e.Item.Accept((DbExpressionVisitor)this);
            this._key.Append(",(");
            bool flag = true;

            foreach (DbExpression dbExpression in (IEnumerable <DbExpression>)e.List)
            {
                if (flag)
                {
                    flag = false;
                }
                else
                {
                    this._key.Append(',');
                }
                dbExpression.Accept((DbExpressionVisitor)this);
            }
            this._key.Append("))");
        }
コード例 #13
0
 public override object Visit(DbInExpression expression)
 {
     throw new System.NotImplementedException();
 }
コード例 #14
0
 public override LegacyCommandTrees.DbExpression Visit(DbInExpression expression)
 {
     // DbInExpression was added in EF6
     throw new NotImplementedException();
 }
コード例 #15
0
 /// <summary>
 ///     Visitor pattern method for DbInExpression.
 /// </summary>
 /// <param name="expression"> The DbInExpression that is being visited. </param>
 public virtual void Visit(DbInExpression expression)
 {
     throw new NotImplementedException(Strings.VisitDbInExpressionNotImplemented);
 }
コード例 #16
0
 public override SqlFragment Visit(DbInExpression expression)
 {
     throw new NotImplementedException("New in Entity Framework v6");
 }
コード例 #17
0
 public override void Visit(DbInExpression expression)
 {
     return;
 }
コード例 #18
0
        public override void Visit(DbInExpression e)
        {
            Check.NotNull(e, "e");

            Begin(e);
            Dump(e.Item);
            Dump(e.List, "List", "Item");
            End(e);
        }
コード例 #19
0
        /// <summary>
        ///     Visitor pattern method for <see cref="DbInExpression" />.
        /// </summary>
        /// <param name="expression"> The DbInExpression that is being visited. </param>
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="expression" />
        ///     is null
        /// </exception>
        public override void Visit(DbInExpression expression)
        {
            Check.NotNull(expression, "expression");

            VisitExpression(expression.Item);
            VisitExpressionList(expression.List);
        }
コード例 #20
0
 public override TReturn Visit(DbInExpression expression)
 {
     Check.NotNull <DbInExpression>(expression, nameof(expression));
     throw this.ConstructNotSupportedException((DbExpression)expression);
 }
コード例 #21
0
        public override void Visit(DbInExpression e)
        {
            Check.NotNull(e, "e");

            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            e.Item.Accept(this);
            _key.Append(",(");

            var first = true;
            foreach (var item in e.List)
            {
                if (first)
                {
                    first = false;
                }
                else
                {
                    _key.Append(',');
                }

                item.Accept(this);
            }

            _key.Append("))");
        }
コード例 #22
0
        public override TReturn Visit(DbInExpression expression)
        {
            Check.NotNull(expression, "expression");

            throw ConstructNotSupportedException(expression);
        }
コード例 #23
0
            public override DbExpressionEntitySetInfo Visit(DbInExpression expression)
            {
                Check.NotNull(expression, "expression");

                return(null);
            }
コード例 #24
0
 public override VfpExpression Visit(DbInExpression expression)
 {
     return(new VfpInExpression(expression.ResultType,
                                expression.Item.Accept(this),
                                CreateDbExpressionList(expression.List)));
 }
コード例 #25
0
 public override ViewValidator.DbExpressionEntitySetInfo Visit(
     DbInExpression expression)
 {
     Check.NotNull <DbInExpression>(expression, nameof(expression));
     return((ViewValidator.DbExpressionEntitySetInfo)null);
 }
コード例 #26
0
ファイル: DmlSqlGenerator.cs プロジェクト: jcwmoore/athena
 public override void Visit(DbInExpression expression)
 {
     base.Visit(expression);
 }
コード例 #27
0
 public override void Visit(DbInExpression expression)
 {
     return;
 }
コード例 #28
0
 public override bool Visit(DbInExpression expression)
 {
     return(false);
 }
コード例 #29
0
        /// <summary>
        ///     <see cref="DbInExpression" />
        /// </summary>
        /// <param name="expression"> The DbInExpression that is being visited. </param>
        /// <returns> </returns>
        public override bool Visit(DbInExpression expression)
        {
            Check.NotNull(expression, "expression");

            return(VisitExpression(expression.Item) || VisitExpressionList(expression.List));
        }