-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInterpreter.h
28 lines (27 loc) · 1.11 KB
/
Interpreter.h
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
#ifndef _INTERPRETER_H_
#define _INTERPRETER_H_
#include <string>
#include "CatalogManager.h"
#include "RecordManager.h"
using namespace std;
// sql解释器
class Interpreter
{
public:
RecordManager Record; // RecordManager, IndexManager和BufferManager在其中调用
CatalogManager Cata; // Catalog Manager
Interpreter(); //构造函数
~Interpreter(); //析构函数
void Parse(string sql); // 解析单条sql的函数
void CreateTable(std::string str); // 针对create table 场景的函数
void CreateIndex(string str); // 针对create index 场景的函数
void Insert(string str); // 针对insert 场景的函数
void Select(string str); // 针对select 场景的函数
void Delete(string str); // Delete from table where
void DropTable(std::string str); // Drop table tablename
void DropIndex(std::string str); // Drop index index name
void ShowTable(std::string str); // Show table tablename
void ShowIndex(std::string str); // show index index name
void ShowDatabase(std::string str);// show database
};
#endif