internal Visitor(Options options, IEnumerable<System.Data.Linq.SqlClient.SqlParameter> parentParameters, SqlFactory sqlFactory) {
     this.options = options;
     this.sql = sqlFactory;
     this.canJoin = true;
     this.isTopLevel = true;
     this.parentParameters = parentParameters;
 }
Esempio n. 2
0
 internal Visitor(Options options, IEnumerable <System.Data.Linq.SqlClient.SqlParameter> parentParameters, SqlFactory sqlFactory)
 {
     this.options          = options;
     this.sql              = sqlFactory;
     this.canJoin          = true;
     this.isTopLevel       = true;
     this.parentParameters = parentParameters;
 }
Esempio n. 3
0
            private void CoerceTypeFamily(SqlExpression arg1, SqlExpression arg2)
            {
                if ((arg1.SqlType.HasPrecisionAndScale && arg2.SqlType.HasPrecisionAndScale && arg1.SqlType != arg2.SqlType) ||
                    SqlFactory.IsSqlHighPrecisionDateTimeType(arg1) || SqlFactory.IsSqlHighPrecisionDateTimeType(arg2))
                {
                    ProviderType best = typeProvider.GetBestType(arg1.SqlType, arg2.SqlType);
                    SetSqlTypeIfSimpleExpression(arg1, best);
                    SetSqlTypeIfSimpleExpression(arg2, best);
                    return;
                }

                // The SQL data type DATE is special, in that it has a higher range but lower
                // precedence, so we need to account for that here (DevDiv 175229)
                if (SqlFactory.IsSqlDateType(arg1) && !SqlFactory.IsSqlHighPrecisionDateTimeType(arg2))
                {
                    SetSqlTypeIfSimpleExpression(arg2, arg1.SqlType);
                }
                else if (SqlFactory.IsSqlDateType(arg2) && !SqlFactory.IsSqlHighPrecisionDateTimeType(arg1))
                {
                    SetSqlTypeIfSimpleExpression(arg1, arg2.SqlType);
                }
            }
Esempio n. 4
0
 internal QueryConverter(IDataServices services, TypeSystemProvider typeProvider, Translator translator, SqlFactory sql) {
     if (services == null) {
         throw Error.ArgumentNull("services");
     }
     if (sql == null) {
         throw Error.ArgumentNull("sql");
     }
     if (translator == null) {
         throw Error.ArgumentNull("translator");
     }
     if (typeProvider == null) {
         throw Error.ArgumentNull("typeProvider");
     }
     this.services = services;
     this.translator = translator;
     this.sql = sql;
     this.typeProvider = typeProvider;
     this.map = new Dictionary<ParameterExpression, SqlExpression>();
     this.exprMap = new Dictionary<ParameterExpression, Expression>();
     this.dupMap = new Dictionary<ParameterExpression, SqlNode>();
     this.gmap = new Dictionary<SqlNode, GroupInfo>();
     this.allowDeferred = true;
 }
 internal LongTypeConverter(SqlFactory sql) {
     this.visitor = new Visitor(sql);
 }
Esempio n. 6
0
 internal SqlBinder(Translator translator, SqlFactory sqlFactory, MetaModel model, DataLoadOptions shape, SqlColumnizer columnizer, bool canUseOuterApply) {
     this.sql = sqlFactory;
     this.columnizer = columnizer;
     this.visitor = new Visitor(this, translator, this.columnizer, this.sql, model, shape, canUseOuterApply);
 }
Esempio n. 7
0
 internal static SqlNode Convert(SqlNode node, SqlFactory sql, MetaModel model)
 {
     return(new Visitor(sql, model).Visit(node));
 }
Esempio n. 8
0
 internal SqlExpander(SqlFactory factory) {
     this.factory = factory;
 }
 internal SqlRewriteScalarSubqueries(SqlFactory sqlFactory)
 {
     this.visitor = new Visitor(sqlFactory);
 }
Esempio n. 10
0
 internal Visitor(SqlFactory sql, SqlColumnizer columnizer)
 {
     this.sql        = sql;
     this.columnizer = columnizer;
     this.isTopLevel = true;
 }
Esempio n. 11
0
        internal static SqlNode Reduce(SqlNode node, SqlFactory factory, SqlNodeAnnotations annotations)
        {
            Visitor r = new Visitor(factory, annotations);

            return(r.Visit(node));
        }
Esempio n. 12
0
 internal SqlReorderer(TypeSystemProvider typeProvider, SqlFactory sqlFactory) {
     this.typeProvider = typeProvider;
     this.sql = sqlFactory;
 }
Esempio n. 13
0
 internal SqlTypeConverter(SqlFactory sql)
 {
     this.sql = sql;
 }
 internal SqlTypeConverter(SqlFactory sql) {
     this.sql = sql;
 }
Esempio n. 15
0
 internal SqlMultiplexer(Options options, IEnumerable <System.Data.Linq.SqlClient.SqlParameter> parentParameters, SqlFactory sqlFactory)
 {
     this.visitor = new Visitor(options, parentParameters, sqlFactory);
 }
Esempio n. 16
0
 internal SqlReorderer(TypeSystemProvider typeProvider, SqlFactory sqlFactory)
 {
     this.typeProvider = typeProvider;
     this.sql          = sqlFactory;
 }
 internal Visitor(SqlNodeAnnotations annotations, SqlFactory sql)
 {
     this.annotations = annotations;
     this.sql         = sql;
 }
Esempio n. 18
0
 internal Visitor(SqlFactory sql)
 {
     this.sql = sql;
 }
Esempio n. 19
0
 internal Visitor(SqlFactory factory, SqlNodeAnnotations annotations)
 {
     this.factory     = factory;
     this.annotations = annotations;
 }
 internal static SqlNode Reduce(SqlNode node, SqlNodeAnnotations annotations, SqlFactory sql)
 {
     return(new Visitor(annotations, sql).Visit(node));
 }
		internal static SqlNode Reduce(SqlNode node, SqlFactory factory, SqlNodeAnnotations annotations) {
			Visitor r = new Visitor(factory, annotations);
			return r.Visit(node);			
		}
 internal SqlMultiplexer(Options options, IEnumerable<System.Data.Linq.SqlClient.SqlParameter> parentParameters, SqlFactory sqlFactory) {
     this.visitor = new Visitor(options, parentParameters, sqlFactory);
 }
 internal Visitor(SqlFactory factory, SqlNodeAnnotations annotations) {
     this.factory = factory;
     this.annotations = annotations;
 }
Esempio n. 24
0
 internal Translator(IDataServices services, SqlFactory sqlFactory, TypeSystemProvider typeProvider)
 {
     this.services     = services;
     this.sql          = sqlFactory;
     this.typeProvider = typeProvider;
 }
 internal static SqlNode Convert(SqlNode node, SqlFactory sql, MetaModel model) {
     return new Visitor(sql, model).Visit(node);
 }
Esempio n. 26
0
 internal Visitor(SqlFactory sql, MetaModel model)
 {
     this.sql   = sql;
     this.model = model;
 }
 internal Visitor(SqlFactory sql, MetaModel model) {
     this.sql = sql;
     this.model = model;
 }
 internal SqlMethodTransformer(SqlFactory sql)
 {
     this.sql = sql;
 }
Esempio n. 29
0
 internal Lifter(TypeSystemProvider typeProvider, MetaModel model)
 {
     this.sql = new SqlFactory(typeProvider, model);
     this.aggregateChecker = new SqlAggregateChecker();
     this.rowNumberChecker = new SqlRowNumberChecker();
 }
Esempio n. 30
0
 internal Visitor(SqlFactory factory)
     : base(true) {
     this.factory = factory;
 }
 internal SqlRewriteScalarSubqueries(SqlFactory sqlFactory) {
     this.visitor = new Visitor(sqlFactory);
 }
Esempio n. 32
0
 internal Visitor(SqlBinder binder, Translator translator, SqlColumnizer columnizer, SqlFactory sqlFactory, MetaModel model, DataLoadOptions shape, bool canUseOuterApply) {
     this.binder = binder;
     this.translator = translator;
     this.columnizer = columnizer;
     this.sql = sqlFactory;
     this.typeProvider = sqlFactory.TypeProvider;
     this.expander = new SqlExpander(this.sql);
     this.aggregateChecker = new SqlAggregateChecker();
     this.linkMap = new LinkOptimizationScope(null);
     this.outerAliasMap = new Dictionary<SqlAlias, SqlAlias>();
     this.model = model;
     this.shape = shape;
     this.canUseOuterApply = canUseOuterApply;
 }
 internal static SqlNode Simplify(SqlNode node, SqlFactory sql) {
     return new Visitor(sql).Visit(node);
 }
Esempio n. 34
0
 internal LongTypeConverter(SqlFactory sql)
 {
     this.visitor = new Visitor(sql);
 }
Esempio n. 35
0
 internal SqlFlattener(SqlFactory sql, SqlColumnizer columnizer) {
     this.visitor = new Visitor(sql, columnizer);
 }
Esempio n. 36
0
 internal Translator(IDataServices services, SqlFactory sqlFactory, TypeSystemProvider typeProvider) {
     this.services = services;
     this.sql = sqlFactory;
     this.typeProvider = typeProvider;
 }
 internal Booleanizer(TypeSystemProvider typeProvider, MetaModel model) {
     this.sql = new SqlFactory(typeProvider, model);
 }
 internal Visitor(SqlFactory sqlFactory) {
     this.sql = sqlFactory;
     this.aggregateChecker = new SqlAggregateChecker();
 }
Esempio n. 39
0
 internal SqlExpander(SqlFactory factory)
 {
     this.factory = factory;
 }
 internal Visitor(SqlFactory sql) {
     this.sql = sql;
 }
Esempio n. 41
0
 internal Visitor(SqlFactory factory)
     : base(true)
 {
     this.factory = factory;
 }
Esempio n. 42
0
 internal Visitor(SqlFactory sql, SqlColumnizer columnizer) {
     this.sql = sql;
     this.columnizer = columnizer;
     this.isTopLevel = true;
 }
 internal Lifter(TypeSystemProvider typeProvider, MetaModel model) {
     this.sql = new SqlFactory(typeProvider, model);
     this.aggregateChecker = new SqlAggregateChecker();
     this.rowNumberChecker = new SqlRowNumberChecker();
 }
Esempio n. 44
0
 internal Visitor(TypeSystemProvider typeProvider, SqlFactory sqlFactory) {
     this.orders = new List<SqlOrderExpression>();
     this.typeProvider = typeProvider;
     this.sql = sqlFactory;
     this.aggregateChecker = new SqlAggregateChecker();
 }
 internal static SqlNode Convert(SqlNode node, SqlFactory sql, SqlProvider.ProviderMode providerMode) {
     return new Visitor(sql, providerMode).Visit(node);
 }
 internal Visitor(SqlFactory sql, SqlProvider.ProviderMode providerMode) {
     this.sql = sql;
     this.providerMode = providerMode;
     this.skipper = new SqlSelectionSkipper(this);
 }
 internal SqlMethodTransformer(SqlFactory sql) {
     this.sql = sql;
 }
 internal Visitor(SqlFactory sqlFactory)
 {
     this.sql = sqlFactory;
     this.aggregateChecker = new SqlAggregateChecker();
 }
Esempio n. 49
0
 internal static SqlNode Reduce(SqlNode node, SqlNodeAnnotations annotations, SqlFactory sql) {
     return new Visitor(annotations, sql).Visit(node);
 }
Esempio n. 50
0
 internal SqlFlattener(SqlFactory sql, SqlColumnizer columnizer)
 {
     this.visitor = new Visitor(sql, columnizer);
 }
Esempio n. 51
0
 internal Visitor(SqlNodeAnnotations annotations, SqlFactory sql) {
     this.annotations = annotations;
     this.sql = sql;
 }
Esempio n. 52
0
 internal Visitor(TypeSystemProvider typeProvider, MetaModel model)
 {
     this.sql          = new SqlFactory(typeProvider, model);
     this.typeProvider = typeProvider;
 }
Esempio n. 53
0
 internal static SqlNode Simplify(SqlNode node, SqlFactory sql)
 {
     return(new Visitor(sql).Visit(node));
 }
Esempio n. 54
0
 internal Visitor(TypeSystemProvider typeProvider, MetaModel model) {
     this.sql = new SqlFactory(typeProvider, model);
     this.typeProvider = typeProvider;
 }
Esempio n. 55
0
 internal Booleanizer(TypeSystemProvider typeProvider, MetaModel model)
 {
     this.sql = new SqlFactory(typeProvider, model);
 }