/// <summary>
 ///     From IncludeExpressionVisitor in EF core
 /// </summary>
 public ReplaceIncludeExpressionVisitor(
     ISelectExpressionFactory selectExpressionFactory,
     ICompositePredicateExpressionVisitorFactory compositePredicateExpressionVisitorFactory,
     IMaterializerFactory materializerFactory,
     IShaperCommandContextFactory shaperCommandContextFactory,
     IRelationalAnnotationProvider relationalAnnotationProvider,
     IQuerySqlGeneratorFactory querySqlGeneratorFactory,
     IQuerySource querySource,
     IReadOnlyList <INavigation> navigationPath,
     RelationalQueryCompilationContext queryCompilationContext,
     IReadOnlyList <int> queryIndexes,
     bool querySourceRequiresTracking,
     INavigationExpressionCollection collection)
 {
     _selectExpressionFactory = selectExpressionFactory;
     _compositePredicateExpressionVisitorFactory = compositePredicateExpressionVisitorFactory;
     _materializerFactory          = materializerFactory;
     _shaperCommandContextFactory  = shaperCommandContextFactory;
     _relationalAnnotationProvider = relationalAnnotationProvider;
     _querySqlGeneratorFactory     = querySqlGeneratorFactory;
     _querySource                 = querySource;
     _navigationPath              = navigationPath;
     _queryCompilationContext     = queryCompilationContext;
     _queryIndexes                = queryIndexes;
     _querySourceRequiresTracking = querySourceRequiresTracking;
     _collection = collection;
 }
 /// <summary>
 ///     Clones this dependency parameter object with one service replaced.
 /// </summary>
 /// <param name="shaperCommandContextFactory"> A replacement for the current dependency of this type. </param>
 /// <returns> A new parameter object with the given service replaced. </returns>
 public RelationalEntityQueryableExpressionVisitorDependencies With([NotNull] IShaperCommandContextFactory shaperCommandContextFactory)
 => new RelationalEntityQueryableExpressionVisitorDependencies(
     Model,
     SelectExpressionFactory,
     MaterializerFactory,
     shaperCommandContextFactory,
     RelationalAnnotationProvider);
Пример #3
0
        public IncludeExpressionVisitor(
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] IShaperCommandContextFactory shaperCommandContextFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
            [NotNull] IQuerySqlGeneratorFactory querySqlGeneratorFactory,
            [NotNull] IQuerySource querySource,
            [NotNull] IReadOnlyList <INavigation> navigationPath,
            [NotNull] RelationalQueryCompilationContext queryCompilationContext,
            [NotNull] IReadOnlyList <int> queryIndexes,
            bool querySourceRequiresTracking)
        {
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(shaperCommandContextFactory, nameof(shaperCommandContextFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));
            Check.NotNull(querySqlGeneratorFactory, nameof(querySqlGeneratorFactory));
            Check.NotNull(querySource, nameof(querySource));
            Check.NotNull(navigationPath, nameof(navigationPath));
            Check.NotNull(queryCompilationContext, nameof(queryCompilationContext));
            Check.NotNull(queryIndexes, nameof(queryIndexes));

            _selectExpressionFactory      = selectExpressionFactory;
            _materializerFactory          = materializerFactory;
            _shaperCommandContextFactory  = shaperCommandContextFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
            _querySqlGeneratorFactory     = querySqlGeneratorFactory;
            _querySource                 = querySource;
            _navigationPath              = navigationPath;
            _queryCompilationContext     = queryCompilationContext;
            _queryIndexes                = queryIndexes;
            _querySourceRequiresTracking = querySourceRequiresTracking;
        }
        public MongoDbEntityQueryableExpressionVisitor(
            [NotNull] EntityQueryModelVisitor entityQueryModelVisitor,
            [NotNull] IModel model,
            [NotNull] IMongoDbAnnotationsProvider annotationsProvider,
            [NotNull] IFindExpressionFactory findExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] IShaperCommandContextFactory shaperCommandContextFactory,
            [NotNull] IValueBufferFromBsonShaperFactory valueBufferShaperFactory)
            : base(Check.NotNull(entityQueryModelVisitor, nameof(entityQueryModelVisitor)))
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(annotationsProvider, nameof(annotationsProvider));
            Check.NotNull(findExpressionFactory, nameof(findExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(shaperCommandContextFactory, nameof(shaperCommandContextFactory));
            Check.NotNull(valueBufferShaperFactory, nameof(valueBufferShaperFactory));


            _model = model;
            _annotationsProvider         = annotationsProvider;
            _findExpressionFactory       = findExpressionFactory;
            _materializerFactory         = materializerFactory;
            _shaperCommandContextFactory = shaperCommandContextFactory;
            _valueBufferShaperFactory    = valueBufferShaperFactory;
        }
 public MaterializingRelationalEntityQueryableExpressionVisitorFactory(IModel model, ISelectExpressionFactory selectExpressionFactory, IMaterializerFactory materializerFactory, 
     IShaperCommandContextFactory shaperCommandContextFactory, IRelationalAnnotationProvider relationalAnnotationProvider) : base(model, selectExpressionFactory, materializerFactory, shaperCommandContextFactory, relationalAnnotationProvider)
 {
     _model = model;
     _selectExpressionFactory = selectExpressionFactory;
     _materializerFactory = materializerFactory;
     _shaperCommandContextFactory = shaperCommandContextFactory;
     _relationalAnnotationProvider = relationalAnnotationProvider;
 }
Пример #6
0
 public RelationalEntityQueryableExpressionVisitor(RelationalEntityQueryableExpressionVisitorDependencies dependencies
                                                   , RelationalQueryModelVisitor queryModelVisitor, IQuerySource querySource)
     : base(dependencies, queryModelVisitor, querySource)
 {
     _model = dependencies.Model;
     _selectExpressionFactory     = dependencies.SelectExpressionFactory;
     _shaperCommandContextFactory = dependencies.ShaperCommandContextFactory;
     _materializerFactory         = dependencies.MaterializerFactory;
     _querySource = querySource;
 }
 public SqlServerExtensionsRelationalEntityQueryableExpressionVisitor(RelationalEntityQueryableExpressionVisitorDependencies dependencies
                                                                      , RelationalQueryModelVisitor queryModelVisitor
                                                                      , IQuerySource querySource)
     : base(dependencies, queryModelVisitor, querySource)
 {
     _model = (dependencies ?? throw new ArgumentNullException(nameof(dependencies))).Model;
     _selectExpressionFactory     = dependencies.SelectExpressionFactory;
     _materializerFactory         = dependencies.MaterializerFactory;
     _shaperCommandContextFactory = dependencies.ShaperCommandContextFactory;
     _querySource = querySource;
 }
 public CypherEntityQueryableExpressionVisitorDependencies(
     [NotNull] IModel model,
     [NotNull] IReadOnlyExpressionFactory readOnlyExpressionFactory,
     [NotNull] ICypherMaterializerFactory materializerFactory,
     [NotNull] IShaperCommandContextFactory shaperCommandContextFactory
     )
 {
     Model = model;
     ReadOnlyExpressionFactory   = readOnlyExpressionFactory;
     MaterializerFactory         = materializerFactory;
     ShaperCommandContextFactory = shaperCommandContextFactory;
 }
        /// <summary>
        ///     Creates a new instance of <see cref="RelationalEntityQueryableExpressionVisitor" />.
        /// </summary>
        /// <param name="dependencies"> Parameter object containing dependencies for this service. </param>
        /// <param name="queryModelVisitor"> The query model visitor. </param>
        /// <param name="querySource"> The query source. </param>
        public RelationalEntityQueryableExpressionVisitor(
            [NotNull] RelationalEntityQueryableExpressionVisitorDependencies dependencies,
            [NotNull] RelationalQueryModelVisitor queryModelVisitor,
            [CanBeNull] IQuerySource querySource)
            : base(Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)))
        {
            Check.NotNull(dependencies, nameof(dependencies));

            _model = dependencies.Model;
            _selectExpressionFactory     = dependencies.SelectExpressionFactory;
            _materializerFactory         = dependencies.MaterializerFactory;
            _shaperCommandContextFactory = dependencies.ShaperCommandContextFactory;
            _querySource = querySource;
        }
        public CypherEntityQueryableExpressionVisitor(
            [NotNull] CypherEntityQueryableExpressionVisitorDependencies dependencies,
            [NotNull] CypherQueryModelVisitor queryModelVisitor,
            [CanBeNull] IQuerySource querySource
            ) : base(Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)))
        {
            Check.NotNull(dependencies, nameof(dependencies));

            _model       = dependencies.Model;
            _querySource = querySource;
            _readOnlyExpressionFactory   = dependencies.ReadOnlyExpressionFactory;
            _materializerFactory         = dependencies.MaterializerFactory;
            _shaperCommandContextFactory = dependencies.ShaperCommandContextFactory;
        }
Пример #11
0
 public ReplaceIncludeExpressionVisitorFactory(ISelectExpressionFactory selectExpressionFactory
                                               , ICompositePredicateExpressionVisitorFactory compositePredicateExpressionVisitorFactory
                                               , IMaterializerFactory materializerFactory
                                               , IShaperCommandContextFactory shaperCommandContextFactory
                                               , IRelationalAnnotationProvider relationalAnnotationProvider
                                               , IQuerySqlGeneratorFactory querySqlGeneratorFactory
                                               , INavigationExpressionCollection collection)
 {
     _selectExpressionFactory = selectExpressionFactory;
     _compositePredicateExpressionVisitorFactory = compositePredicateExpressionVisitorFactory;
     _materializerFactory          = materializerFactory;
     _shaperCommandContextFactory  = shaperCommandContextFactory;
     _relationalAnnotationProvider = relationalAnnotationProvider;
     _querySqlGeneratorFactory     = querySqlGeneratorFactory;
     _collection = collection;
 }
Пример #12
0
 public LiteDBEntityQueryableExpressionVisitorFactory(
     IModel model,
     ILiteDBAnnotationsProvider annotationsProvider,
     IFindExpressionFactory findExpressionFactory,
     IMaterializerFactory materializerFactory,
     IShaperCommandContextFactory shaperCommandContextFactory,
     IValueBufferFromBsonShaperFactory valueBufferShaperFactory
     )
 {
     _model = model;
     _annotationsProvider         = annotationsProvider;
     _findExpressionFactory       = findExpressionFactory;
     _materializerFactory         = materializerFactory;
     _shaperCommandContextFactory = shaperCommandContextFactory;
     _valueBufferShaperFactory    = valueBufferShaperFactory;
 }
        /// <summary>
        ///     <para>
        ///         Creates the service dependencies parameter object for a
        ///         <see cref="RelationalEntityQueryableExpressionVisitorFactory" />.
        ///     </para>
        ///     <para>
        ///         Do not call this constructor directly from either provider or application code as it may change
        ///         as new dependencies are added. Instead, use this type in your constructor so that an instance
        ///         will be created and injected automatically by the dependency injection container. To create
        ///         an instance with some dependent services replaced, first resolve the object from the dependency
        ///         injection container, then replace selected services using the 'With...' methods. Do not call
        ///         the constructor at any point in this process.
        ///     </para>
        /// </summary>
        /// <param name="model"> The model. </param>
        /// <param name="selectExpressionFactory"> The select expression factory. </param>
        /// <param name="materializerFactory"> The materializer factory. </param>
        /// <param name="shaperCommandContextFactory"> The shaper command context factory. </param>
        public RelationalEntityQueryableExpressionVisitorDependencies(
            [NotNull] IModel model,
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] IShaperCommandContextFactory shaperCommandContextFactory)
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(shaperCommandContextFactory, nameof(shaperCommandContextFactory));

            Model = model;
            SelectExpressionFactory     = selectExpressionFactory;
            MaterializerFactory         = materializerFactory;
            ShaperCommandContextFactory = shaperCommandContextFactory;
        }
Пример #14
0
        public IncludeExpressionVisitorFactory(
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] IShaperCommandContextFactory shaperCommandContextFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
            [NotNull] IQuerySqlGeneratorFactory querySqlGeneratorFactory)
        {
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(shaperCommandContextFactory, nameof(shaperCommandContextFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));
            Check.NotNull(querySqlGeneratorFactory, nameof(querySqlGeneratorFactory));

            _selectExpressionFactory      = selectExpressionFactory;
            _materializerFactory          = materializerFactory;
            _shaperCommandContextFactory  = shaperCommandContextFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
            _querySqlGeneratorFactory     = querySqlGeneratorFactory;
        }
        public RelationalEntityQueryableExpressionVisitorFactory(
            [NotNull] IModel model,
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] IShaperCommandContextFactory shaperCommandContextFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider)
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(shaperCommandContextFactory, nameof(shaperCommandContextFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));

            _model = model;
            _selectExpressionFactory      = selectExpressionFactory;
            _materializerFactory          = materializerFactory;
            _shaperCommandContextFactory  = shaperCommandContextFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
        }
        /// <summary>
        ///     Creates a new instance of <see cref="RelationalEntityQueryableExpressionVisitorFactory" />.
        /// </summary>
        /// <param name="model"> The model. </param>
        /// <param name="selectExpressionFactory"> The select expression factory. </param>
        /// <param name="materializerFactory"> The materializer factory. </param>
        /// <param name="shaperCommandContextFactory"> The shaper command context factory. </param>
        /// <param name="relationalAnnotationProvider"> The relational annotation provider. </param>
        public RelationalEntityQueryableExpressionVisitorFactory(
            [NotNull] IModel model,
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] IShaperCommandContextFactory shaperCommandContextFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider)
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(shaperCommandContextFactory, nameof(shaperCommandContextFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));

            _model = model;
            _selectExpressionFactory = selectExpressionFactory;
            _materializerFactory = materializerFactory;
            _shaperCommandContextFactory = shaperCommandContextFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
        }
Пример #17
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 MySqlIncludeExpressionVisitorFactory(
     [NotNull] ISelectExpressionFactory selectExpressionFactory,
     [NotNull] ICompositePredicateExpressionVisitorFactory compositePredicateExpressionVisitorFactory,
     [NotNull] IMaterializerFactory materializerFactory,
     [NotNull] IShaperCommandContextFactory shaperCommandContextFactory,
     [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
     [NotNull] IQuerySqlGeneratorFactory querySqlGeneratorFactory) : base(
         selectExpressionFactory,
         compositePredicateExpressionVisitorFactory,
         materializerFactory,
         shaperCommandContextFactory,
         relationalAnnotationProvider,
         querySqlGeneratorFactory
         )
 {
     _selectExpressionFactory = selectExpressionFactory;
     _compositePredicateExpressionVisitorFactory = compositePredicateExpressionVisitorFactory;
     _materializerFactory          = materializerFactory;
     _shaperCommandContextFactory  = shaperCommandContextFactory;
     _relationalAnnotationProvider = relationalAnnotationProvider;
     _querySqlGeneratorFactory     = querySqlGeneratorFactory;
 }
        /// <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 IncludeExpressionVisitorFactory(
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] ICompositePredicateExpressionVisitorFactory compositePredicateExpressionVisitorFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] IShaperCommandContextFactory shaperCommandContextFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
            [NotNull] IQuerySqlGeneratorFactory querySqlGeneratorFactory)
        {
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(compositePredicateExpressionVisitorFactory, nameof(compositePredicateExpressionVisitorFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(shaperCommandContextFactory, nameof(shaperCommandContextFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));
            Check.NotNull(querySqlGeneratorFactory, nameof(querySqlGeneratorFactory));

            _selectExpressionFactory = selectExpressionFactory;
            _compositePredicateExpressionVisitorFactory = compositePredicateExpressionVisitorFactory;
            _materializerFactory = materializerFactory;
            _shaperCommandContextFactory = shaperCommandContextFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
            _querySqlGeneratorFactory = querySqlGeneratorFactory;
        }
        /// <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 IncludeExpressionVisitorFactory(
            [NotNull] SelectExpressionDependencies selectExpressionDependencies,
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] ICompositePredicateExpressionVisitorFactory compositePredicateExpressionVisitorFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] IShaperCommandContextFactory shaperCommandContextFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider)
        {
            Check.NotNull(selectExpressionDependencies, nameof(selectExpressionDependencies));
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(compositePredicateExpressionVisitorFactory, nameof(compositePredicateExpressionVisitorFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(shaperCommandContextFactory, nameof(shaperCommandContextFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));

            _selectExpressionDependencies = selectExpressionDependencies;
            _selectExpressionFactory      = selectExpressionFactory;
            _compositePredicateExpressionVisitorFactory = compositePredicateExpressionVisitorFactory;
            _materializerFactory          = materializerFactory;
            _shaperCommandContextFactory  = shaperCommandContextFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
        }
Пример #20
0
        public RelationalEntityQueryableExpressionVisitor(
            [NotNull] IModel model,
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] IShaperCommandContextFactory shaperCommandContextFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
            [NotNull] RelationalQueryModelVisitor queryModelVisitor,
            [CanBeNull] IQuerySource querySource)
            : base(Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)))
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(shaperCommandContextFactory, nameof(shaperCommandContextFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));

            _model = model;
            _selectExpressionFactory      = selectExpressionFactory;
            _materializerFactory          = materializerFactory;
            _shaperCommandContextFactory  = shaperCommandContextFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
            _querySource = querySource;
        }