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; }
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; }
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); } }
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); }
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); }
internal static SqlNode Convert(SqlNode node, SqlFactory sql, MetaModel model) { return(new Visitor(sql, model).Visit(node)); }
internal SqlExpander(SqlFactory factory) { this.factory = factory; }
internal SqlRewriteScalarSubqueries(SqlFactory sqlFactory) { this.visitor = new Visitor(sqlFactory); }
internal Visitor(SqlFactory sql, SqlColumnizer columnizer) { this.sql = sql; this.columnizer = columnizer; this.isTopLevel = true; }
internal static SqlNode Reduce(SqlNode node, SqlFactory factory, SqlNodeAnnotations annotations) { Visitor r = new Visitor(factory, annotations); return(r.Visit(node)); }
internal SqlReorderer(TypeSystemProvider typeProvider, SqlFactory sqlFactory) { this.typeProvider = typeProvider; this.sql = sqlFactory; }
internal SqlTypeConverter(SqlFactory sql) { this.sql = sql; }
internal SqlMultiplexer(Options options, IEnumerable <System.Data.Linq.SqlClient.SqlParameter> parentParameters, SqlFactory sqlFactory) { this.visitor = new Visitor(options, parentParameters, sqlFactory); }
internal Visitor(SqlNodeAnnotations annotations, SqlFactory sql) { this.annotations = annotations; this.sql = sql; }
internal Visitor(SqlFactory sql) { this.sql = sql; }
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 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); }
internal Visitor(SqlFactory sql, MetaModel model) { this.sql = sql; this.model = model; }
internal SqlMethodTransformer(SqlFactory sql) { this.sql = sql; }
internal Lifter(TypeSystemProvider typeProvider, MetaModel model) { this.sql = new SqlFactory(typeProvider, model); this.aggregateChecker = new SqlAggregateChecker(); this.rowNumberChecker = new SqlRowNumberChecker(); }
internal Visitor(SqlFactory factory) : base(true) { this.factory = factory; }
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); }
internal SqlFlattener(SqlFactory sql, SqlColumnizer columnizer) { this.visitor = new Visitor(sql, columnizer); }
internal Booleanizer(TypeSystemProvider typeProvider, MetaModel model) { this.sql = new SqlFactory(typeProvider, model); }
internal Visitor(SqlFactory sqlFactory) { this.sql = sqlFactory; this.aggregateChecker = new SqlAggregateChecker(); }
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 static SqlNode Reduce(SqlNode node, SqlNodeAnnotations annotations, SqlFactory sql) { return new Visitor(annotations, sql).Visit(node); }
internal Visitor(TypeSystemProvider typeProvider, MetaModel model) { this.sql = new SqlFactory(typeProvider, model); this.typeProvider = typeProvider; }
internal static SqlNode Simplify(SqlNode node, SqlFactory sql) { return(new Visitor(sql).Visit(node)); }