-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoperationManager.h
More file actions
43 lines (36 loc) · 1.51 KB
/
operationManager.h
File metadata and controls
43 lines (36 loc) · 1.51 KB
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
37
38
39
40
41
42
43
//
// Created by jimena on 16/06/17.
//
#ifndef MASTERENGINE_OPERATIONMANAGER_H
#define MASTERENGINE_OPERATIONMANAGER_H
#include "table.h"
#include "resultCode.h"
#include "connectionManager.h"
#include "tableManager.h"
#include "JSON library/json.hpp"
#include "where.h"
#include "join.h"
#include "tableutils.h"
using json = nlohmann::json;
class OperationManager{
public:
OperationManager(TableManager* tableManager);
Table select(json inputJson);
resultCode create();
resultCode update(json j);
resultCode drop(json j);
resultCode deleteT(json j);
resultCode insert(json j);
resultCode createIndex();
TableManager* tables;
private:
Table selectAux(std::string tableName, std::vector<std::string> columns, Where whereObject, Join joinObject);
Table selectAux(std::string tableName, std::vector<std::string> columns, Where whereObject);
Table selectAux(std::string tableName, std::vector<std::string> columns, Join joinObject);
Table selectAux(std::string tableName, std::vector<std::string> columns);
resultCode updateAux(std::string tableName, std::vector<std::string> columns, std::vector<std::string> values);
resultCode updateAux(std::string tableName, std::vector<std::string> columns, std::vector<std::string> values, Where whereObject);
//resultCode deleteAux(std::string tableName, std::vector<std::string> columns, std::vector<std::string> values);
resultCode deleteAux(std::string tableName, Where whereObject);
};
#endif //MASTERENGINE_OPERATIONMANAGER_H