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

#include <filescan.h>

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

Public Member Functions

 FileScan (FileId rel_id, FileId result_id, std::vector< FieldId > fields, std::vector< Comp > comps, std::vector< void * > values, Catalog *catalog)
 Constructor for FileScan select operation.
 
 ~FileScan ()
 Destructor for FileScan. Deletes dynamic member variables.
 
void runOperation ()
 Runs the filescan operation. All tuples of the relations will be looped over and checked against the value and comparison conditions. For each tuple, if it passes these conditions, it will be added to the result file.
 
- Public Member Functions inherited from 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.
 
 ~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.
 

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

Detailed Description

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

Constructor & Destructor Documentation

◆ FileScan()

FileScan::FileScan ( FileId  rel_id,
FileId  result_id,
std::vector< FieldId fields,
std::vector< Comp >  comps,
std::vector< void * >  values,
Catalog catalog 
)

Constructor for FileScan select operation.

Parameters
rel_id.File id for the relation file.
result_id.File id for 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.

Member Function Documentation

◆ runOperation()

void FileScan::runOperation ( )
virtual

Runs the filescan operation. All tuples of the relations will be looped over and checked against the value and comparison conditions. For each tuple, if it passes these conditions, it will be added to the result file.

Precondition
Valid files and parameters have been passed to the contructor.
Postcondition
Result file has been populated with records that meet the criteria of the operation.

Implements Operation.


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