-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
49 lines (39 loc) · 1.23 KB
/
main.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
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <iostream>
#include "Table.h"
#include "TableRow.h"
#include "DataBase.git/Engine.h"
#include "DataBase.git/TableRepo.h"
int main() {
/*Engine engine();
engine.run();*/
TableRow<double> row("id","double");
row.setRowValue(5.234);
row.setRowValue(5.234);
TableRow<double> row3("id","double");
row3.setRowValue(2.14);
row3.setRowValue(2.14);
row3.setRowValue(2.14);
row.setRowValue(5.234);
row.setRowValue(5.234);
TableRow<string> row1("name","string");
row1.setRowValue("Gonzo");
row1.setRowValue("Ersen");
TableRow<int> row2("secondName","string");
/* cout<< row.getRowName() << endl;
cout << row.getRowType() << endl;
row1.getRowValues();*/
Table<int,string, double> table("Table");
table.insertDoubleTableRow(row);
table.insertStringTableRow(row1);
table.insertIntTableRow(row2);
table.insertDoubleTableRow(row3);
TableRepo <int,string, double> repo;
repo.addTable(table);
/*repo.describeTableTypes("Table");*/
repo.addColumn("Table","age", "int");
repo.print("Table");
repo.aggregate("Table",3,2.14,0,"minimum");
/*repo.saveTable("NewTable","saved_tables.txt");*/
/*table.save("outputFile.txt");*/
return 0;
}