-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
43 lines (41 loc) · 831 Bytes
/
main.cpp
File metadata and controls
43 lines (41 loc) · 831 Bytes
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
#include"src/Catalog.h"
#include"src/global.h"
#include"src/IndexManager.h"
#include"src/RecordManager.h"
#include"src/Interpreter.h"
#include"src/BufferManager.h"
#include"src/Page.h"
#include <time.h>
using namespace std;
bool infile = 0;
long long start, endtime;
int BufferManager:: lruCounter[CACHE_CAPACITY];
Page BufferManager:: cachePages[CACHE_CAPACITY];
bool BufferManager:: pined[CACHE_CAPACITY];
bool BufferManager:: isDirty[CACHE_CAPACITY];
Interpreter i;
RecordManager record;
IndexManager index;
CatalogManager catalog;
BufferManager buf;
int main()
{
bool execfile = false;
static auto _ = []()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
return 0;
}();
while (i.flag == true)
{
cout << "MINI SQL >>>" << ends;
i.Query();
if (i.query != "")
{
i.Choice();
}
}
return 0;
}