Esempio n. 1
0
 internal virtual SqlExpression VisitClientQuery(SqlClientQuery cq)
 {
     for (int i = 0, n = cq.Arguments.Count; i < n; i++)
     {
         cq.Arguments[i] = this.VisitExpression(cq.Arguments[i]);
     }
     return(cq);
 }
Esempio n. 2
0
            internal override SqlExpression VisitClientQuery(SqlClientQuery cq)
            {
                // block where clauses from being lifted out of a client-materialized sub-query
                Scope save = this.current;

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

                this.current = save;
                return(result);
            }
Esempio n. 3
0
        internal static SqlClientQuery Extract(SqlSubSelect subquery, IEnumerable <System.Data.Linq.SqlClient.SqlParameter> parentParameters)
        {
            SqlClientQuery cq = new SqlClientQuery(subquery);

            if (parentParameters != null)
            {
                cq.Parameters.AddRange(parentParameters);
            }
            Visitor v = new Visitor(cq.Arguments, cq.Parameters);

            cq.Query = (SqlSubSelect)v.Visit(subquery);
            return(cq);
        }
            internal override SqlExpression VisitClientQuery(SqlClientQuery cq)
            {
                SqlSubSelect   query = (SqlSubSelect)this.VisitExpression(cq.Query);
                SqlClientQuery nq    = new SqlClientQuery(query);

                for (int i = 0, n = cq.Arguments.Count; i < n; i++)
                {
                    nq.Arguments.Add(this.VisitExpression(cq.Arguments[i]));
                }
                for (int i = 0, n = cq.Parameters.Count; i < n; i++)
                {
                    nq.Parameters.Add((SqlParameter)this.VisitExpression(cq.Parameters[i]));
                }
                return(nq);
            }
Esempio n. 5
0
            internal override SqlExpression VisitClientQuery(SqlClientQuery cq)
            {
                var subquery       = (SqlSubSelect)VisitExpression(cq.Query);
                var sqlClientQuery = new SqlClientQuery(subquery);
                var i = 0;

                for (var count = cq.Arguments.Count; i < count; i++)
                {
                    sqlClientQuery.Arguments.Add(VisitExpression(cq.Arguments[i]));
                }
                var j = 0;

                for (var count2 = cq.Parameters.Count; j < count2; j++)
                {
                    sqlClientQuery.Parameters.Add((SqlParameter)VisitExpression(cq.Parameters[j]));
                }
                return(sqlClientQuery);
            }
Esempio n. 6
0
 internal override SqlExpression VisitClientQuery(SqlClientQuery cq)
 {
     return(cq);
 }
Esempio n. 7
0
 internal override SqlExpression VisitClientQuery(SqlClientQuery cq)
 {
     this.foundHierarchy = true;
     return(cq);
 }