Esempio n. 1
0
 public ProjectionEvaluator(ParameterAggregator parameterAggregator, System.Type inputType, Func<Expression, bool> predicate)
 {
     _parameterAggregator = parameterAggregator;
     _inputParameter = Expression.Parameter(inputType, "input");
     _predicate = predicate;
     _hqlTreeBuilder = new HqlTreeBuilder();
     _stack = new HqlNodeStack(_hqlTreeBuilder);
 }
Esempio n. 2
0
		public static CommandData GenerateHqlQuery(QueryModel queryModel, ParameterAggregator aggregator)
		{
			// Rewrite aggregate group by statements
			new AggregatingGroupByRewriter().VisitQueryModel(queryModel);

			// Swap out non-aggregating group bys
			new NonAggregatingGroupByRewriter().VisitQueryModel(queryModel);

            // Merge aggregating result operators (distinct, count, sum etc) into the select clause
		    new MergeAggregatingResultsRewriter().VisitQueryModel(queryModel);

			var visitor = new QueryModelVisitor(aggregator);
			visitor.VisitQueryModel(queryModel);
			return visitor.GetHqlCommand();
		}
Esempio n. 3
0
		private QueryModelVisitor(ParameterAggregator parameterAggregator)
		{
			_hqlTreeBuilder = new HqlTreeBuilder();
			_parameterAggregator = parameterAggregator;
		}