SwatDB
|
#include <project.h>
Public Member Functions | |
Project (FileId rel_id, FileId result_id, std::vector< FieldId > fields, Catalog *catalog) | |
Constructor for Project operation. | |
~Project () | |
Destructor for the Select Operation. | |
void | runOperation () |
Runs the 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. | |
Protected Attributes | |
std::vector< FieldId > | fields |
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. | |
Project is a derived class of operation that implements the project operation, which removes some number of columns from a relation.
Project::Project | ( | FileId | rel_id, |
FileId | result_id, | ||
std::vector< FieldId > | fields, | ||
Catalog * | catalog | ||
) |
Constructor for Project operation.
rel_id. | FileId of the relation file. |
result_id. | FileId of the result file. |
fields. | Vector of field ids for the select operation. |
catalog. | pointer to the catalog of SwatDB |
|
virtual |
Runs the operation.
Implements Operation.
|
protected |
Fields that will be kept following the execution of the project operation.