Class for all supported DBMS operations on relations. More...
#include <query.h>
Static Public Member Functions | |
static void | Select (const std::string &result, int projCnt, const attrInfo projNames[], const attrInfo *attr, Operator op, const void *attrValue) |
static void | Join (const std::string &result, int projCnt, const attrInfo projNames[], const attrInfo *attr1, Operator op, const attrInfo *attr2) |
static void | IndexSelect (const std::string &result, int projCnt, const attrInfo projNames[], const attrInfo *attr, Operator op, const void *attrValue) |
static void | ScanSelect (const std::string &result, int projCnt, const attrInfo projNames[], const attrInfo *attr, Operator op, const void *attrValue) |
void badgerdb::Operators::Join | ( | const std::string & | result, |
int | projCnt, | ||
const attrInfo | projNames[], | ||
const attrInfo * | attr1, | ||
Operator | op, | ||
const attrInfo * | attr2 | ||
) | [static] |
Join Operator. Performs Simple Nested Loops join or Index nested Loops join or Sort Merge Join depending upon the join predicates and availability of indices. Get attribute description for all projection attributes and predicate attributes from attribute catalog, compute the length of record for the 'result' relation. Use one of aforementioned join algorithms to compute the result.
Definition at line 19 of file join.cpp.
{ }
void badgerdb::Operators::Select | ( | const std::string & | result, |
int | projCnt, | ||
const attrInfo | projNames[], | ||
const attrInfo * | attr, | ||
Operator | op, | ||
const void * | attrValue | ||
) | [static] |
Select Operator. Performs scan select or index select depending upon the select predicates and availability of indices. Get attribute description from relcat relation for all the projection attributes. Compute length of records for the 'result' relation which will only contain projection attributes. Perform one of scan select and index select operations which will insert records in the result relation corresponding to expected output.
Definition at line 27 of file select.cpp.
{ if((op == Operator(EQ))){ //NEED TO CHECK IF THERE IS AN INDEX ALSO //INDEX SELECT IndexSelect(result, projCnt, projNames, attr, op, attrValue); }else{ //Scan select //printAttrInfo(&projNames[0]); //printAttrInfo(attr); ScanSelect(result, projCnt, projNames, attr, op, attrValue); } }