コード例 #1
0
        public override AlgebraNode VisitTopAlgebraNode(TopAlgebraNode node)
        {
            TopIterator topIterator;

            if (node.TieEntries == null)
            {
                topIterator = new TopIterator();
            }
            else
            {
                TopWithTiesIterator topWithTiesIterator = new TopWithTiesIterator();
                topWithTiesIterator.TieEntries = GetIteratorInput(node.Input.OutputList, node.TieEntries);
                topIterator = topWithTiesIterator;
            }

            topIterator.RowBuffer   = new object[node.OutputList.Length];
            topIterator.Limit       = node.Limit;
            topIterator.Input       = ConvertAlgebraNode(node.Input);
            topIterator.InputOutput = GetIteratorOutput(0, node.Input.OutputList, node.OutputList);
            SetLastIterator(node, topIterator);

            return(node);
        }
コード例 #2
0
ファイル: IteratorCreator.cs プロジェクト: chenzuo/nquery
		public override AlgebraNode VisitTopAlgebraNode(TopAlgebraNode node)
		{
			TopIterator topIterator;

			if (node.TieEntries == null)
			{
				topIterator = new TopIterator();
			}
			else
			{
				TopWithTiesIterator topWithTiesIterator = new TopWithTiesIterator();
				topWithTiesIterator.TieEntries = GetIteratorInput(node.Input.OutputList, node.TieEntries);
				topIterator = topWithTiesIterator;
			}

			topIterator.RowBuffer = new object[node.OutputList.Length];
			topIterator.Limit = node.Limit;
			topIterator.Input = ConvertAlgebraNode(node.Input);
			topIterator.InputOutput = GetIteratorOutput(0, node.Input.OutputList, node.OutputList);
			SetLastIterator(node, topIterator);

			return node;
		}