Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RavenQueryInspector{T}"/> class.
        /// </summary>
        public void Init(
            IRavenQueryProvider provider,
            QueryStatistics queryStats,
#if FEATURE_HIGHLIGHTING
            QueryHighlightings highlightings,
#endif
            string indexName,
            string collectionName,
            Expression expression,
            InMemoryDocumentSessionOperations session,
            bool isMapReduce)
        {
            _conventions = session.Conventions;
            _provider    = provider?.For <T>() ?? throw new ArgumentNullException(nameof(provider));
            _queryStats  = queryStats;
#if FEATURE_HIGHLIGHTING
            _highlightings = highlightings;
#endif
            _indexName      = indexName;
            _collectionName = collectionName;
            _session        = session;
            _isMapReduce    = isMapReduce;
            _provider.AfterQueryExecuted(AfterQueryExecuted);
            _expression = expression ?? Expression.Constant(this);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RavenQueryProvider{T}"/> class.
        /// </summary>
        public RavenQueryProvider(
            IDocumentQueryGenerator queryGenerator,
            string indexName,
            string collectionName,
            Type originalQueryType,
            QueryStatistics queryStatistics,
            QueryHighlightings highlightings,
            bool isMapReduce)
        {
            FieldsToFetch     = new HashSet <FieldToFetch>();
            OriginalQueryType = originalQueryType;

            _queryGenerator  = queryGenerator;
            _indexName       = indexName;
            _collectionName  = collectionName;
            _queryStatistics = queryStatistics;
            _highlightings   = highlightings;
            _isMapReduce     = isMapReduce;
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RavenQueryProvider{T}"/> class.
        /// </summary>
        public RavenQueryProvider(
#if FEATURE_HIGHLIGHTING
            QueryHighlightings highlightings,
#endif
            IDocumentQueryGenerator queryGenerator,
            string indexName,
            string collectionName,
            Type originalQueryType,
            QueryStatistics queryStatistics,
            bool isMapReduce, DocumentConventions conventions)
        {
            FieldsToFetch     = new HashSet <FieldToFetch>();
            OriginalQueryType = originalQueryType;

            _queryGenerator  = queryGenerator;
            _indexName       = indexName;
            _collectionName  = collectionName;
            _queryStatistics = queryStatistics;
#if FEATURE_HIGHLIGHTING
            _highlightings = highlightings;
#endif
            _isMapReduce = isMapReduce;
            _conventions = conventions;
        }