This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
dmspine64backup/test.cpp

49 lines
1 KiB
C++
Raw Normal View History

2015-09-14 15:04:54 -05:00
#include <iostream>
2015-09-15 20:22:35 -05:00
#include <vector>
2015-09-15 21:31:19 -05:00
#include "DBEngine.h"
2015-09-15 21:36:52 -05:00
2015-09-15 20:22:35 -05:00
using namespace std;
2015-09-15 21:36:52 -05:00
2015-09-15 21:31:19 -05:00
//still in progress
2015-09-15 20:55:21 -05:00
int main() {
2015-09-15 16:30:25 -05:00
DBEngine engine;
2015-09-15 20:22:35 -05:00
2015-09-15 21:31:19 -05:00
Attribute att1("shamWow", "VARCHAR(10)", true);
att1.addRow("rag");
att1.addRow("sponge");
att1.addRow("wooow");
att1.addRow("cloth");
2015-09-15 20:16:58 -05:00
2015-09-15 21:31:19 -05:00
Attribute att2("doom", "VARCHAR(20)", false);
att2.addRow("zombieman");
att2.addRow("revenant");
att2.addRow("imp");
att2.addRow("archvile");
2015-09-15 20:16:58 -05:00
2015-09-15 21:31:19 -05:00
vector<Attribute> vec;
vec.push_back(att1);
vec.push_back(att2);
2015-09-15 21:58:44 -05:00
Attribute att3("name", "VARCHAR(20)", true);
att1.addRow("Fry");
att1.addRow("Bender");
att1.addRow("Leela");
att1.addRow("Zoidberg");
Attribute att4("age", "INTEGER", false);
att2.addRow("22");
att2.addRow("5");
att2.addRow("22");
att2.addRow("50");
vector<Attribute> vec2;
vec2.push_back(att3);
vec2.push_back(att4);
2015-09-15 20:16:58 -05:00
2015-09-15 21:42:08 -05:00
//beginning testing of core DB functions
2015-09-15 21:31:19 -05:00
engine.createTable("table1", vec);
2015-09-15 21:58:44 -05:00
engine.createTable("table2", vec2);
engine.showTables(engine.getTableFromName("table1"));
2015-09-15 21:42:08 -05:00
2015-09-15 10:21:16 -05:00
}