/// <summary>
        /// Queries the index specified by <typeparamref name="TIndexCreator"/> using Linq.
        /// </summary>
        /// <typeparam name="T">The result of the query</typeparam>
        /// <typeparam name="TIndexCreator">The type of the index creator.</typeparam>
        /// <returns></returns>
        public IRavenQueryable <T> Query <T, TIndexCreator>() where TIndexCreator : AbstractIndexCreationTask, new()
        {
            var indexCreator = new TIndexCreator
            {
                Conventions = Conventions
            };

            return(Query <T>(indexCreator.IndexName)
                   .Customize(x => x.TransformResults(indexCreator.ApplyReduceFunctionIfExists)));
        }
예제 #2
0
        /// <summary>
        /// Queries the index specified by <typeparamref name="TIndexCreator"/> using Linq.
        /// </summary>
        /// <typeparam name="T">The result of the query</typeparam>
        /// <typeparam name="TIndexCreator">The type of the index creator.</typeparam>
        /// <returns></returns>
        public IRavenQueryable <T> Query <T, TIndexCreator>() where TIndexCreator : AbstractIndexCreationTask, new()
        {
            var indexCreator = new TIndexCreator
            {
                Conventions = Conventions
            };

            return(Query <T>(indexCreator.IndexName, indexCreator.IsMapReduce)
#pragma warning disable 612,618
                   .Customize(x => x.TransformResults(indexCreator.ApplyReduceFunctionIfExists)));

#pragma warning restore 612,618
        }
예제 #3
0
        /// <summary>
        /// Queries the index specified by <typeparamref name="TIndexCreator"/> using lucene syntax.
        /// </summary>
        /// <typeparam name="T">The result of the query</typeparam>
        /// <typeparam name="TIndexCreator">The type of the index creator.</typeparam>
        /// <returns></returns>
        public IDocumentQuery <T> LuceneQuery <T, TIndexCreator>() where TIndexCreator : AbstractIndexCreationTask, new()
        {
            var index = new TIndexCreator();

            return(LuceneQuery <T>(index.IndexName));
        }
예제 #4
0
        /// <summary>
        /// Queries the index specified by <typeparamref name="TIndexCreator"/> using Linq.
        /// </summary>
        /// <typeparam name="T">The result of the query</typeparam>
        /// <typeparam name="TIndexCreator">The type of the index creator.</typeparam>
        /// <returns></returns>
        public IRavenQueryable <T> Query <T, TIndexCreator>() where TIndexCreator : AbstractIndexCreationTask, new()
        {
            var indexCreator = new TIndexCreator();

            return(Query <T>(indexCreator.IndexName));
        }
예제 #5
0
        /// <summary>
        /// Queries the index specified by <typeparamref name="TIndexCreator"/> using lucene syntax.
        /// </summary>
        /// <typeparam name="T">The result of the query</typeparam>
        /// <typeparam name="TIndexCreator">The type of the index creator.</typeparam>
        /// <returns></returns>
        public IAsyncDocumentQuery <T> AsyncLuceneQuery <T, TIndexCreator>() where TIndexCreator : AbstractIndexCreationTask, new()
        {
            var index = new TIndexCreator();

            return(AsyncLuceneQuery <T>(index.IndexName, index.IsMapReduce));
        }
예제 #6
0
        public IDocumentQuery <T> DocumentQuery <T, TIndexCreator>() where TIndexCreator : AbstractIndexCreationTask, new()
        {
            var indexName = new TIndexCreator().IndexName;

            return(DocumentQuery <T>(indexName));
        }
예제 #7
0
        /// <summary>
        /// Queries the index specified by <typeparamref name="TIndexCreator"/> using lucene syntax.
        /// </summary>
        /// <typeparam name="T">The result of the query</typeparam>
        /// <typeparam name="TIndexCreator">The type of the index creator.</typeparam>
        /// <returns></returns>
        public IDocumentQuery <T> DocumentQuery <T, TIndexCreator>() where TIndexCreator : AbstractCommonApiForIndexes, new()
        {
            var index = new TIndexCreator();

            return(DocumentQuery <T>(index.IndexName, null, index.IsMapReduce));
        }
예제 #8
0
        /// <summary>
        /// Queries the index specified by <typeparamref name="TIndexCreator"/> using Linq.
        /// </summary>
        /// <typeparam name="T">The result of the query</typeparam>
        /// <typeparam name="TIndexCreator">The type of the index creator.</typeparam>
        /// <returns></returns>
        public IRavenQueryable <T> Query <T, TIndexCreator>() where TIndexCreator : AbstractCommonApiForIndexes, new()
        {
            var indexCreator = new TIndexCreator();

            return(Query <T>(indexCreator.IndexName, null, indexCreator.IsMapReduce));
        }