예제 #1
0
        public override void VisitSelectClause(SelectClause selectClause, QueryModel queryModel)
        {
            CurrentEvaluationType = selectClause.GetOutputDataInfo();

            switch (_queryMode)
            {
            case QueryMode.Delete:
                VisitDeleteClause(selectClause.Selector);
                return;

            case QueryMode.Update:
            case QueryMode.UpdateVersioned:
                VisitUpdateClause(selectClause.Selector);
                return;

            case QueryMode.Insert:
                VisitInsertClause(selectClause.Selector);
                return;
            }

            //This is a standard select query

            var visitor = new SelectClauseVisitor(typeof(object[]), VisitorParameters);

            visitor.VisitSelector(selectClause.Selector);

            if (visitor.ProjectionExpression != null)
            {
                _hqlTree.AddItemTransformer(visitor.ProjectionExpression);
            }

            _hqlTree.AddSelectClause(_hqlTree.TreeBuilder.Select(visitor.GetHqlNodes()));

            base.VisitSelectClause(selectClause, queryModel);
        }
예제 #2
0
        public override void VisitSelectClause(SelectClause selectClause, QueryModel queryModel)
        {
            CurrentEvaluationType = selectClause.GetOutputDataInfo();

            var visitor = new SelectClauseVisitor(typeof(object[]), VisitorParameters);

            visitor.Visit(selectClause.Selector);

            if (visitor.ProjectionExpression != null)
            {
                _hqlTree.AddItemTransformer(visitor.ProjectionExpression);
            }

            _hqlTree.AddSelectClause(_hqlTree.TreeBuilder.Select(visitor.GetHqlNodes()));

            base.VisitSelectClause(selectClause, queryModel);
        }
예제 #3
0
		public override void VisitSelectClause(SelectClause selectClause, QueryModel queryModel)
		{
			CurrentEvaluationType = selectClause.GetOutputDataInfo();

			var visitor = new SelectClauseVisitor(typeof(object[]), VisitorParameters);

			visitor.Visit(selectClause.Selector);

			if (visitor.ProjectionExpression != null)
			{
				_hqlTree.AddItemTransformer(visitor.ProjectionExpression);
			}

			_hqlTree.AddSelectClause(_hqlTree.TreeBuilder.Select(visitor.GetHqlNodes()));

			base.VisitSelectClause(selectClause, queryModel);
		}