/** <inheritdoc /> */
        public Func <object[], IQueryCursor <TQ> > CompileQuery <TQ>(LambdaExpression queryExpression)
        {
            var executor = CacheQueryProvider.Executor;

            // Generate two models: from current expression, and from provided lambda.
            // Lambda expression provides a way to identify argument mapping.
            // Comparing two models allows to check whether whole query is within lambda.
            var model       = GetQueryModel();
            var lambdaModel = CacheQueryProvider.GenerateQueryModel(queryExpression.Body);

            return(executor.CompileQuery <TQ>(model, lambdaModel, queryExpression));
        }
Esempio n. 2
0
 /** <inheritdoc /> */
 public QueryModel GetQueryModel()
 {
     return(CacheQueryProvider.GenerateQueryModel(Expression));
 }