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
Rebecca Schofield dd4453c9aa update works
2015-10-06 23:19:53 -05:00

40 lines
1,000 B
C++
Executable file

#include <iostream>
#include <vector>
#include "Parser.h"
//#include "Condition.h"
#include "DBEngine.h"
//#include "user.h"
using namespace std;
int main () {
DBEngine engine;
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");
att1.addCell("Pancakes");
att2.addCell("Turkey Sandwich");
att2.addCell("Caesar Salad");
att2.addCell("Pizza");
att2.addCell("Sushi");
att3.addCell("Steak");
att3.addCell("Shrimp");
att3.addCell("Ribs");
att3.addCell("Lasagna");
vector<Attribute> v;
v.push_back(att1);
v.push_back(att2);
v.push_back(att3);
engine.createTable("Food", v);
//engine.getTableFromName("Food").display();
parse("UPDATE Food SET ( Dinner = \"SUCCESS\" ) WHERE ( Breakfast == \"Pancakes\" ) ;", engine);
engine.getTableFromName("Food").display();
}