Beispiel #1
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 RelationalQueryCompilationContext(
            [NotNull] QueryCompilationContextDependencies dependencies,
            [NotNull] ILinqOperatorProvider linqOperatorProvider,
            [NotNull] IQueryMethodProvider queryMethodProvider,
            bool trackQueryResults)
            : base(dependencies, linqOperatorProvider, trackQueryResults)
        {
            Check.NotNull(queryMethodProvider, nameof(queryMethodProvider));

            QueryMethodProvider            = queryMethodProvider;
            ParentQueryReferenceParameters = new List <string>();
        }
Beispiel #2
0
        public QueryCompilationContext(
            QueryCompilationContextDependencies dependencies,
            bool async)
        {
            IsAsync        = async;
            IsTracking     = dependencies.IsTracking;
            IsBuffering    = 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;
        }
        /// <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;
        }
        public QueryCompilationContext(
            QueryCompilationContextDependencies dependencies,
            bool async)
        {
            var context = dependencies.CurrentContext.Context;

            IsAsync        = async;
            IsTracking     = context.ChangeTracker.QueryTrackingBehavior == QueryTrackingBehavior.TrackAll;
            Model          = dependencies.Model;
            ContextOptions = dependencies.ContextOptions;
            ContextType    = context.GetType();
            Logger         = dependencies.Logger;

            _queryTranslationPreprocessorFactory = dependencies.QueryTranslationPreprocessorFactory;
            _queryableMethodTranslatingExpressionVisitorFactory = dependencies.QueryableMethodTranslatingExpressionVisitorFactory;
            _queryTranslationPostprocessorFactory         = dependencies.QueryTranslationPostprocessorFactory;
            _shapedQueryCompilingExpressionVisitorFactory = dependencies.ShapedQueryCompilingExpressionVisitorFactory;
        }
        /// <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();
        }
Beispiel #6
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(
            [NotNull] QueryCompilationContextDependencies dependencies,
            bool async)
        {
            Check.NotNull(dependencies, nameof(dependencies));

            Dependencies          = dependencies;
            IsAsync               = async;
            QueryTrackingBehavior = dependencies.QueryTrackingBehavior;
            IsBuffering           = 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;
        }
Beispiel #7
0
 public RalmsCompilationQueryableFactory(
     QueryCompilationContextDependencies dependencies,
     RelationalQueryCompilationContextDependencies relationalDependencies)
     : base(dependencies)
     => relationalDependencies