SwatDB
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Select Class Reference

#include <select.h>

Inheritance diagram for Select:
Inheritance graph
[legend]
Collaboration diagram for Select:
Collaboration graph
[legend]

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< FieldIdfields
 
std::vector< Comp > comps
 
std::vector< void * > values
 
fileState file_state
 
- Protected Attributes inherited from Operation
fileState result_state
 
Catalogcatalog
 

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.
 

Detailed Description

Select is an abstract class that lays the foundation for select operations

Constructor & Destructor Documentation

◆ Select()

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.

Parameters
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
Precondition
file_name is the name of a valid file.
Postcondition
private variables have been set accordingly.

Member Data Documentation

◆ comps

std::vector<Comp> Select::comps
protected

comparators used in the select operation

◆ fields

std::vector<FieldId> Select::fields
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

◆ values

std::vector<void *> Select::values
protected

Values used in the select operation. Type is void * because this could be a mix of float, int, and char * types.


The documentation for this class was generated from the following file: