Package edu.caltech.nanodb.server
Class CommandResult.ResultCollector
- java.lang.Object
-
- edu.caltech.nanodb.server.CommandResult.ResultCollector
-
- All Implemented Interfaces:
TupleProcessor
- Enclosing class:
- CommandResult
private class CommandResult.ResultCollector extends java.lang.Object implements TupleProcessor
This inner class is used to collect the results of aSelectCommand
.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ResultCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finish()
This function is called when all tuples have been produced and passed to the tuple processor.void
process(Tuple tuple)
Processes a single tuple generated from evaluating a query plan.void
setSchema(Schema s)
This method is called once by the query evaluator before any tuples are passed to theTupleProcessor.process(edu.caltech.nanodb.relations.Tuple)
method, so that the tuple-processor knows what the expected tuple-schema will be.
-
-
-
Method Detail
-
setSchema
public void setSchema(Schema s)
Description copied from interface:TupleProcessor
This method is called once by the query evaluator before any tuples are passed to theTupleProcessor.process(edu.caltech.nanodb.relations.Tuple)
method, so that the tuple-processor knows what the expected tuple-schema will be.- Specified by:
setSchema
in interfaceTupleProcessor
-
process
public void process(Tuple tuple)
Description copied from interface:TupleProcessor
Processes a single tuple generated from evaluating a query plan.- Specified by:
process
in interfaceTupleProcessor
- Parameters:
tuple
- The tuple to process.
-
finish
public void finish()
Description copied from interface:TupleProcessor
This function is called when all tuples have been produced and passed to the tuple processor.- Specified by:
finish
in interfaceTupleProcessor
-
-