-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexecutor.cpp
36 lines (32 loc) · 1.18 KB
/
executor.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include"global.h"
void executeCommand(){
switch(parsedQuery.queryType){
case CLEAR: executeCLEAR(); break;
case CROSS: executeCROSS(); break;
case DISTINCT: executeDISTINCT(); break;
case EXPORT: executeEXPORT(); break;
case INDEX: executeINDEX(); break;
case JOIN: executeJOIN(); break;
case LIST: executeLIST(); break;
case LOAD: executeLOAD(); break;
//Self Implemented : Begin
case LOAD_MATRIX: executeLOAD_MATRIX(); break;
case PRINT_MATRIX: executePRINT_MATRIX(); break;
case CROSS_TRANSPOSE: executeCROSS_TRANSPOSE(); break;
case EXPORT_MATRIX: executeEXPORT_MATRIX(); break;
//Self Implemented : End
case PRINT: executePRINT(); break;
case PROJECTION: executePROJECTION(); break;
case RENAME: executeRENAME(); break;
case SELECTION: executeSELECTION(); break;
case GROUP_BY: executeGROUP_BY();
case SORT: executeSORT(); break;
case SOURCE: executeSOURCE(); break;
default: cout<<"PARSING ERROR"<<endl;
}
return;
}
void printRowCount(int rowCount){
cout<<"\n\nRow Count: "<<rowCount<<endl;
return;
}