2015-09-15 20:16:58 -05:00
|
|
|
#include <iostream>
|
|
|
|
#include <vector>
|
2015-09-24 20:02:57 -05:00
|
|
|
#include "Condition.h"
|
2015-09-15 21:31:19 -05:00
|
|
|
#include "DBEngine.h"
|
2015-09-15 20:16:58 -05:00
|
|
|
|
|
|
|
using namespace std;
|
2015-09-14 15:04:54 -05:00
|
|
|
|
2015-09-15 21:31:19 -05:00
|
|
|
//still in progress
|
2015-09-14 15:04:54 -05:00
|
|
|
int main() {
|
2015-09-15 20:16:58 -05:00
|
|
|
DBEngine engine;
|
2015-09-17 17:14:28 -05:00
|
|
|
Attribute att1("Breakfast", "VARCHAR(20)", true);
|
|
|
|
Attribute att2("Lunch", "VARCHAR(20)", false);
|
|
|
|
Attribute att3("Dinner", "VARCHAR(20)", false);
|
|
|
|
|
|
|
|
att1.addCell("Pancakes");
|
|
|
|
att1.addCell("Waffles");
|
|
|
|
att1.addCell("Biscuits");
|
|
|
|
att2.addCell("Turkey Sandwich");
|
|
|
|
att2.addCell("Caesar Salad");
|
|
|
|
att2.addCell("Pizza");
|
|
|
|
att3.addCell("Steak");
|
|
|
|
att3.addCell("Shrimp");
|
|
|
|
att3.addCell("Ribs");
|
|
|
|
|
|
|
|
vector<Attribute> v;
|
|
|
|
v.push_back(att1);
|
|
|
|
v.push_back(att2);
|
|
|
|
v.push_back(att3);
|
|
|
|
|
2015-09-22 09:03:42 -05:00
|
|
|
engine.createTable("Food", v);
|
2015-09-24 20:02:57 -05:00
|
|
|
|
2015-09-24 20:42:59 -05:00
|
|
|
Attribute att4("SecondBreakfast", "VARCHAR(20)", true);
|
|
|
|
Attribute att5("SecondLunch", "VARCHAR(20)", false);
|
|
|
|
Attribute att6("SecondDinner", "VARCHAR(20)", false);
|
|
|
|
|
|
|
|
att4.addCell("Pancakes");
|
|
|
|
att4.addCell("Bacon");
|
|
|
|
att4.addCell("Eggs");
|
|
|
|
att5.addCell("Turkey Sandwich");
|
|
|
|
att5.addCell("Pasta Salad");
|
|
|
|
att5.addCell("Taco");
|
|
|
|
att6.addCell("Steak");
|
|
|
|
att6.addCell("Fajitas");
|
|
|
|
att6.addCell("Spaghetti");
|
|
|
|
|
|
|
|
vector<Attribute> v2;
|
|
|
|
v2.push_back(att4);
|
|
|
|
v2.push_back(att5);
|
|
|
|
v2.push_back(att6);
|
|
|
|
|
|
|
|
engine.createTable("MoarFood", v2);
|
|
|
|
|
|
|
|
//engine.setUnion(engine.getTableFromName("Food"), engine.getTableFromName("MoarFood")).display();
|
2015-09-24 21:00:21 -05:00
|
|
|
}
|