Ejemplo n.º 1
0
            internal override SqlExpression VisitClientQuery(SqlClientQuery cq)
            {
                Scope current = this.current;

                this.current = null;
                SqlExpression expression = base.VisitClientQuery(cq);

                this.current = current;
                return(expression);
            }
Ejemplo n.º 2
0
        internal virtual SqlExpression VisitClientQuery(SqlClientQuery cq)
        {
            int num   = 0;
            int count = cq.Arguments.Count;

            while (num < count)
            {
                cq.Arguments[num] = this.VisitExpression(cq.Arguments[num]);
                num++;
            }
            return(cq);
        }
Ejemplo n.º 3
0
            internal override SqlExpression VisitClientQuery(SqlClientQuery cq)
            {
                Type elementType = (cq.Query.NodeType == SqlNodeType.Multiset)
                                       ? TypeSystem.GetElementType(cq.ClrType)
                                       : cq.ClrType;
                ICompiledSubQuery item = provider.CompileSubQuery(cq.Query.Select,
                                                                  elementType, new ReadOnlyCollection <SqlParameter>(cq.Parameters));

                cq.Ordinal = subQueries.Count;
                subQueries.Add(item);
                return(cq);
            }
Ejemplo n.º 4
0
        // Methods
        internal static SqlClientQuery Extract(SqlSubSelect subquery, IEnumerable <SqlParameter> parentParameters, SqlIdentifier sqlIdentity)
        {
            var query = new SqlClientQuery(subquery);

            if (parentParameters != null)
            {
                //query.Parameters.AddRange(parentParameters);
                foreach (var parameter in parentParameters)
                {
                    query.Parameters.Add(parameter);
                }
            }
            var visitor = new Visitor(query.Arguments, query.Parameters, sqlIdentity);

            query.Query = (SqlSubSelect)visitor.Visit(subquery);
            return(query);
        }
Ejemplo n.º 5
0
            internal override SqlExpression VisitClientQuery(SqlClientQuery cq)
            {
                var subquery = (SqlSubSelect)this.VisitExpression(cq.Query);
                var query    = new SqlClientQuery(subquery);
                int num      = 0;
                int count    = cq.Arguments.Count;

                while (num < count)
                {
                    query.Arguments.Add(this.VisitExpression(cq.Arguments[num]));
                    num++;
                }
                int num3 = 0;
                int num4 = cq.Parameters.Count;

                while (num3 < num4)
                {
                    query.Parameters.Add((SqlParameter)this.VisitExpression(cq.Parameters[num3]));
                    num3++;
                }
                return(query);
            }
Ejemplo n.º 6
0
 internal override SqlExpression VisitClientQuery(SqlClientQuery cq)
 {
     return(cq);
 }