-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSQLProcessor.hpp
48 lines (34 loc) · 1.02 KB
/
SQLProcessor.hpp
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
44
45
46
47
48
// Created by rick gessner on 4/18/20.
// Copyright © 2020 rick gessner. All rights reserved.
//
// Modified by Zongheng Cao after the skeleton All rights reserved.
//
// used for SQL commands, like: show tables, select, create table, delete table
// update data, alter table, describe table....
#ifndef SQLProcessor_hpp
#define SQLProcessor_hpp
#include <stdio.h>
#include <stdlib.h>
#include "CommandProcessor.hpp"
#include "Tokenizer.hpp"
#include "Schema.hpp"
#include "SQLStatement.h"
#include "Database.hpp"
#include "Storage.hpp"
#include "StorageBlock.hpp"
#include <sstream>
class Statement;
class Database; //define this later...
namespace ECE141 {
class SQLProcessor : public CommandProcessor {
public:
SQLProcessor(CommandProcessor *aNext=nullptr);
virtual ~SQLProcessor(){
};
virtual Statement* getStatement(Tokenizer &aTokenizer);
virtual StatusResult interpret(const Statement &aStatement);
protected:
Database* activeDB;
};
}
#endif /* SQLProcessor_hpp */