예제 #1
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;
 }
예제 #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;
 }
예제 #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);
                }
            }
예제 #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);
 }
예제 #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);
 }
예제 #7
0
 internal static SqlNode Convert(SqlNode node, SqlFactory sql, MetaModel model)
 {
     return(new Visitor(sql, model).Visit(node));
 }
예제 #8
0
 internal SqlExpander(SqlFactory factory) {
     this.factory = factory;
 }
 internal SqlRewriteScalarSubqueries(SqlFactory sqlFactory)
 {
     this.visitor = new Visitor(sqlFactory);
 }
예제 #10
0
 internal Visitor(SqlFactory sql, SqlColumnizer columnizer)
 {
     this.sql        = sql;
     this.columnizer = columnizer;
     this.isTopLevel = true;
 }
예제 #11
0
        internal static SqlNode Reduce(SqlNode node, SqlFactory factory, SqlNodeAnnotations annotations)
        {
            Visitor r = new Visitor(factory, annotations);

            return(r.Visit(node));
        }
예제 #12
0
 internal SqlReorderer(TypeSystemProvider typeProvider, SqlFactory sqlFactory) {
     this.typeProvider = typeProvider;
     this.sql = sqlFactory;
 }
예제 #13
0
 internal SqlTypeConverter(SqlFactory sql)
 {
     this.sql = sql;
 }
 internal SqlTypeConverter(SqlFactory sql) {
     this.sql = sql;
 }
예제 #15
0
 internal SqlMultiplexer(Options options, IEnumerable <System.Data.Linq.SqlClient.SqlParameter> parentParameters, SqlFactory sqlFactory)
 {
     this.visitor = new Visitor(options, parentParameters, sqlFactory);
 }
예제 #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;
 }
예제 #18
0
 internal Visitor(SqlFactory sql)
 {
     this.sql = sql;
 }
예제 #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);			
		}
예제 #22
0
 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;
 }
예제 #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);
 }
예제 #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;
 }
예제 #29
0
 internal Lifter(TypeSystemProvider typeProvider, MetaModel model)
 {
     this.sql = new SqlFactory(typeProvider, model);
     this.aggregateChecker = new SqlAggregateChecker();
     this.rowNumberChecker = new SqlRowNumberChecker();
 }
예제 #30
0
 internal Visitor(SqlFactory factory)
     : base(true) {
     this.factory = factory;
 }
 internal SqlRewriteScalarSubqueries(SqlFactory sqlFactory) {
     this.visitor = new Visitor(sqlFactory);
 }
예제 #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);
 }
예제 #34
0
 internal LongTypeConverter(SqlFactory sql)
 {
     this.visitor = new Visitor(sql);
 }
예제 #35
0
 internal SqlFlattener(SqlFactory sql, SqlColumnizer columnizer) {
     this.visitor = new Visitor(sql, columnizer);
 }
예제 #36
0
 internal Translator(IDataServices services, SqlFactory sqlFactory, TypeSystemProvider typeProvider) {
     this.services = services;
     this.sql = sqlFactory;
     this.typeProvider = typeProvider;
 }
예제 #37
0
 internal Booleanizer(TypeSystemProvider typeProvider, MetaModel model) {
     this.sql = new SqlFactory(typeProvider, model);
 }
 internal Visitor(SqlFactory sqlFactory) {
     this.sql = sqlFactory;
     this.aggregateChecker = new SqlAggregateChecker();
 }
예제 #39
0
 internal SqlExpander(SqlFactory factory)
 {
     this.factory = factory;
 }
 internal Visitor(SqlFactory sql) {
     this.sql = sql;
 }
예제 #41
0
 internal Visitor(SqlFactory factory)
     : base(true)
 {
     this.factory = factory;
 }
예제 #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();
 }
예제 #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();
 }
예제 #49
0
 internal static SqlNode Reduce(SqlNode node, SqlNodeAnnotations annotations, SqlFactory sql) {
     return new Visitor(annotations, sql).Visit(node);
 }
예제 #50
0
 internal SqlFlattener(SqlFactory sql, SqlColumnizer columnizer)
 {
     this.visitor = new Visitor(sql, columnizer);
 }
예제 #51
0
 internal Visitor(SqlNodeAnnotations annotations, SqlFactory sql) {
     this.annotations = annotations;
     this.sql = sql;
 }
예제 #52
0
 internal Visitor(TypeSystemProvider typeProvider, MetaModel model)
 {
     this.sql          = new SqlFactory(typeProvider, model);
     this.typeProvider = typeProvider;
 }
예제 #53
0
 internal static SqlNode Simplify(SqlNode node, SqlFactory sql)
 {
     return(new Visitor(sql).Visit(node));
 }
예제 #54
0
 internal Visitor(TypeSystemProvider typeProvider, MetaModel model) {
     this.sql = new SqlFactory(typeProvider, model);
     this.typeProvider = typeProvider;
 }
예제 #55
0
 internal Booleanizer(TypeSystemProvider typeProvider, MetaModel model)
 {
     this.sql = new SqlFactory(typeProvider, model);
 }