SwatDB
|
#include <select.h>
Public Member Functions | |
Select (FileId rel_id, FileId result_id, std::vector< FieldId > fields, std::vector< Comp > comps, std::vector< void * > values, Catalog *catalog) | |
Constructor for Select operation. Both FileScan and IndexScan use this constructor. | |
~Select () | |
Destructor for the Select Operation. | |
Public Member Functions inherited from Operation | |
Operation (FileId result_id, Catalog *catalog) | |
Constructor for the Operation class. Because Operation is an abstract class, an object cannot be created, but this constructor is used by derived classes. | |
virtual | ~Operation () |
Destructor for the Operation class. Cleans up dynamic memory in result state. | |
virtual void | runOperation ()=0 |
Runs the operation. Other than initial setup in the initialization, all the work of each operation is done in this function. It is a pure virtual method, and is implemented in inherited classes. All child classes must implement this method. | |
Protected Attributes | |
std::vector< FieldId > | fields |
std::vector< Comp > | comps |
std::vector< void * > | values |
fileState | file_state |
Protected Attributes inherited from Operation | |
fileState | result_state |
Catalog * | catalog |
Additional Inherited Members | |
Protected Member Functions inherited from Operation | |
void | _initState (FileId file_id, std::vector< FieldId > fields, fileState *state) |
Performs the file and temporary record setup for relational operators. | |
void | _delState (fileState *file_state) |
Deletes objects created in relop structs. | |
Select is an abstract class that lays the foundation for select operations
Select::Select | ( | FileId | rel_id, |
FileId | result_id, | ||
std::vector< FieldId > | fields, | ||
std::vector< Comp > | comps, | ||
std::vector< void * > | values, | ||
Catalog * | catalog | ||
) |
Constructor for Select operation. Both FileScan and IndexScan use this constructor.
rel_id. | FileId of the relation file. |
result_id. | FileId of the result file. |
fields. | Vector of field ids for the select operation. |
comps. | Vector of Comps for the select operation. |
values. | Vector of Void * for the select operation. |
catalog. | pointer to the catalog of SwatDB |
|
protected |
comparators used in the select operation
|
protected |
The positions of the following three vectors are lined up, so index 0 of each are one conjunct of the select, index 1 is the next, and so on. Fields used in the select operation
|
protected |
Values used in the select operation. Type is void * because this could be a mix of float, int, and char * types.