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

#include <indexscan.h>

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

Public Member Functions

 IndexScan (FileId rel_id, FileId index_id, FileId result_id, std::vector< FieldId > fields, std::vector< Comp > comps, std::vector< void * > values, Catalog *catalog)
 Constructor for IndexScan select operation.
 
 ~IndexScan ()
 Destructor for IndexScan. Delete dynamic member variables.
 
void runOperation ()
 Runs the operation. This is a pure virtual method, and is
implemented in inherited classes. All child classes must implement
this method.

 
- 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.
 

Private Attributes

HashIndexFileindex_file
 

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

◆ IndexScan()

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

Constructor for IndexScan select operation.

Parameters
rel_id.FileId of the relation file.
index_id.FileId of the index 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.Catalog * for SwatDB.

Member Function Documentation

◆ runOperation()

void IndexScan::runOperation ( )
virtual

Runs the operation. This is a pure virtual method, and is
implemented in inherited classes. All child classes must implement
this method.

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.

Member Data Documentation

◆ index_file

HashIndexFile* IndexScan::index_file
private

HashIndex * for the index file being selected on.


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