/// <summary>
        ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
        ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
        ///     any release. You should only use it directly in your code with extreme caution and knowing that
        ///     doing so can result in application failures when updating to a new Entity Framework Core release.
        /// </summary>
        public SqlServerQueryCompilationContextFactory(
            QueryCompilationContextDependencies dependencies,
            RelationalQueryCompilationContextDependencies relationalDependencies,
            ISqlServerConnection sqlServerConnection)
        {
            Check.NotNull(dependencies, nameof(dependencies));
            Check.NotNull(relationalDependencies, nameof(relationalDependencies));

            _dependencies           = dependencies;
            _relationalDependencies = relationalDependencies;
            _sqlServerConnection    = sqlServerConnection;
        }
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public MySqlQueryCompilationContext(
     [NotNull] QueryCompilationContextDependencies dependencies,
     [NotNull] ILinqOperatorProvider linqOperatorProvider,
     [NotNull] IQueryMethodProvider queryMethodProvider,
     bool trackQueryResults)
     : base(
         dependencies,
         linqOperatorProvider,
         queryMethodProvider,
         trackQueryResults)
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// </summary>
 /// <param name="dependencies"></param>
 /// <param name="linqOperatorProvider"></param>
 /// <param name="queryMethodProvider"></param>
 /// <param name="trackQueryResults"></param>
 public SpannerQueryCompilationContext(
     QueryCompilationContextDependencies dependencies,
     ILinqOperatorProvider linqOperatorProvider,
     IQueryMethodProvider queryMethodProvider,
     bool trackQueryResults)
     : base(
         dependencies,
         linqOperatorProvider,
         queryMethodProvider,
         trackQueryResults)
 {
 }
Exemplo n.º 4
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public QueryCompilationContext(
            [NotNull] QueryCompilationContextDependencies dependencies,
            [NotNull] ILinqOperatorProvider linqOperatorProvider,
            bool trackQueryResults)
        {
            Check.NotNull(dependencies, nameof(dependencies));
            Check.NotNull(linqOperatorProvider, nameof(linqOperatorProvider));

            Model  = dependencies.Model;
            Logger = dependencies.Logger;

            _entityQueryModelVisitorFactory = dependencies.EntityQueryModelVisitorFactory;
            _requiresMaterializationExpressionVisitorFactory = dependencies.RequiresMaterializationExpressionVisitorFactory;

            LinqOperatorProvider = linqOperatorProvider;
            ContextType          = dependencies.CurrentContext.Context.GetType();
            TrackQueryResults    = trackQueryResults;
        }
Exemplo n.º 5
0
    /// <summary>
    ///     Creates a new instance of the <see cref="QueryCompilationContext" /> class.
    /// </summary>
    /// <param name="dependencies">Parameter object containing dependencies for this class.</param>
    /// <param name="async">A bool value indicating whether it is for async query.</param>
    public QueryCompilationContext(
        QueryCompilationContextDependencies dependencies,
        bool async)
    {
        Dependencies          = dependencies;
        IsAsync               = async;
        QueryTrackingBehavior = dependencies.QueryTrackingBehavior;
        IsBuffering           = ExecutionStrategy.Current?.RetriesOnFailure ?? dependencies.IsRetryingExecutionStrategy;
        Model          = dependencies.Model;
        ContextOptions = dependencies.ContextOptions;
        ContextType    = dependencies.ContextType;
        Logger         = dependencies.Logger;

        _queryTranslationPreprocessorFactory = dependencies.QueryTranslationPreprocessorFactory;
        _queryableMethodTranslatingExpressionVisitorFactory = dependencies.QueryableMethodTranslatingExpressionVisitorFactory;
        _queryTranslationPostprocessorFactory         = dependencies.QueryTranslationPostprocessorFactory;
        _shapedQueryCompilingExpressionVisitorFactory = dependencies.ShapedQueryCompilingExpressionVisitorFactory;

        _expressionPrinter = new ExpressionPrinter();
    }
Exemplo n.º 6
0
        /// <summary>
        /// 实例化
        /// </summary>
        /// <param name="dependencies">编译上下文依赖</param>
        /// <param name="relationalDependencies">关系编译上下文依赖</param>
        /// <param name="options">选项</param>
        /// <param name="logger">日志</param>
        public OracleQueryCompilationContextFactory(
            [NotNull] QueryCompilationContextDependencies dependencies,
            [NotNull] RelationalQueryCompilationContextDependencies relationalDependencies,
            [NotNull] IOracleOptions options,
            IDiagnosticsLogger <DbLoggerCategory.Query> logger = null)
            : base(dependencies, relationalDependencies)
        {
            if (Check.IsTraceEnabled(logger?.Logger))
            {
                Trace <DbLoggerCategory.Query> .Write(logger, LogLevel.Trace, OracleTraceTag.Entry, OracleTraceClassName.OracleQueryCompilationContextFactory, OracleTraceFuncName.ctor);
            }

            if (options != null && options.OracleSQLCompatibility != null)
            {
                _oracleSQLCompatibility = options.OracleSQLCompatibility;
            }
            m_oracleLogger = logger;

            if (Check.IsTraceEnabled(logger?.Logger))
            {
                Trace <DbLoggerCategory.Query> .Write(m_oracleLogger, LogLevel.Trace, OracleTraceTag.Exit, OracleTraceClassName.OracleQueryCompilationContextFactory, OracleTraceFuncName.ctor);
            }
        }
Exemplo n.º 7
0
 public HarmonyQueryCompilationContextFactory(QueryCompilationContextDependencies dependencies)
 {
     _dependencies = dependencies;
 }
 public AS400QueryCompilationContextFactory(
     [NotNull] QueryCompilationContextDependencies dependencies,
     [NotNull] RelationalQueryCompilationContextDependencies relationalDependencies)
     : base(dependencies, relationalDependencies)
 {
 }
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public QueryCompilationContextFactory(QueryCompilationContextDependencies dependencies)
 {
     Dependencies = dependencies;
 }
 /// <summary>
 /// </summary>
 /// <param name="dependencies"></param>
 /// <param name="relationalDependencies"></param>
 public SpannerQueryCompilationContextFactory(
     QueryCompilationContextDependencies dependencies,
     RelationalQueryCompilationContextDependencies relationalDependencies)
     : base(dependencies, relationalDependencies)
 {
 }
Exemplo n.º 11
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public CosmosQueryCompilationContext(
     QueryCompilationContextDependencies dependencies,
     bool async)
     : base(dependencies, async)
 {
 }
Exemplo n.º 12
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public CosmosQueryCompilationContextFactory(QueryCompilationContextDependencies dependencies)
 {
     Check.NotNull(dependencies, nameof(dependencies));
     _dependencies = dependencies;
 }
 public NpgsqlQueryCompilationContext(
     [NotNull] QueryCompilationContextDependencies dependencies,
     [NotNull] RelationalQueryCompilationContextDependencies relationalDependencies, bool async)
     : base(dependencies, relationalDependencies, async)
 {
 }
Exemplo n.º 14
0
 /// <inheritdoc />
 public LinqQueryCompilationContextFactory(
     [NotNull] QueryCompilationContextDependencies dependencies) : base(dependencies)
 {
 }
 public HarmonyQueryCompilationContext(QueryCompilationContextDependencies dependencies, bool async) : base(dependencies, async)
 {
 }