diff --git a/DBEngine.cpp b/DBEngine.cpp index 83208e8..b9072a6 100755 --- a/DBEngine.cpp +++ b/DBEngine.cpp @@ -214,20 +214,8 @@ Relation DBEngine::setDiff(Relation r1, Relation r2){ //currently all returned relations are called TEMP Relation new_r = r1; new_r.setTableName("TEMP"); - vector temp; -<<<<<<< HEAD - //bool duplicate = false; - - int size = 0; - - - for(int x = 0; x < r2.getAttributes().size(); ++x) - { - - for (int i = 0; i < r2.getAttributes()[x].getSize(); ++i) - { - -======= + vector temp; + //bool duplicate = false; int size = 0; @@ -235,7 +223,6 @@ Relation DBEngine::setDiff(Relation r1, Relation r2){ { for (int i = 0; i < r2.getAttributes()[x].getSize(); ++i) { ->>>>>>> e3ef70bf1536697f14395063975a6376b7df6f61 temp = r2.getTuple(i); for(int y = 0; y < new_r.getAttributes().size(); ++y) @@ -257,12 +244,8 @@ Relation DBEngine::setDiff(Relation r1, Relation r2){ size = new_r.getAttributes()[y].getSize(); } } - } -<<<<<<< HEAD - } -======= + } } ->>>>>>> e3ef70bf1536697f14395063975a6376b7df6f61 return new_r; } } @@ -300,9 +283,7 @@ Relation DBEngine::crossProduct(Relation r1, Relation r2){ } - return new_r; -<<<<<<< HEAD -======= + return new_r; } //UPDATE Senator @@ -310,6 +291,5 @@ Relation DBEngine::crossProduct(Relation r1, Relation r2){ //WHERE Name = ‘Joseph Lieberman’ Relation DBEngine::update(Relation r, string attNameSet, string attSet, string attNameWhere, string attWhere){ - return r; ->>>>>>> e3ef70bf1536697f14395063975a6376b7df6f61 + return r; } diff --git a/DBEngine.h b/DBEngine.h index 788bc34..922336b 100755 --- a/DBEngine.h +++ b/DBEngine.h @@ -29,12 +29,8 @@ public: void storeCommands(string s); Relation rename(vector newnames, Relation &r); Relation setUnion(Relation r1, Relation r2); - Relation setDiff(Relation r1, Relation r2); -<<<<<<< HEAD - Relation crossProduct(Relation r1, Relation r2); -======= + Relation setDiff(Relation r1, Relation r2); Relation crossProduct(Relation r1, Relation r2); Relation update(Relation r, string attNameSet, string attSet, string attNameWhere, string attWhere); //Relation deleteCmd(); ->>>>>>> e3ef70bf1536697f14395063975a6376b7df6f61 }; diff --git a/Parser.cpp b/Parser.cpp index 0cf3214..cebedb2 100755 --- a/Parser.cpp +++ b/Parser.cpp @@ -989,7 +989,7 @@ vector deleteCMD(vector input, DBEngine &engine) } } - rcond = condition(); + //rcond = condition(); // send delete command to DBEngine } diff --git a/test b/test index becb786..2817c04 100755 Binary files a/test and b/test differ diff --git a/test.cpp b/test.cpp index 8990e3e..8b4189e 100755 --- a/test.cpp +++ b/test.cpp @@ -1,21 +1,13 @@ #include #include -#include "Parser.h" -<<<<<<< HEAD +#include "Parser.h" //#include "Condition.h" #include "DBEngine.h" -#include "user.h" -======= -#include "Condition.h" -#include "DBEngine.h" ->>>>>>> e3ef70bf1536697f14395063975a6376b7df6f61 +//#include "user.h" using namespace std; -int main () { -<<<<<<< HEAD - -======= +int main () { DBEngine engine; Attribute att1("Breakfast", "VARCHAR(20)", true); @@ -51,6 +43,5 @@ int main () { parse(x, engine); cout << "Enter DBMS Commands: "; } - */ ->>>>>>> e3ef70bf1536697f14395063975a6376b7df6f61 + */ } diff --git a/user.cpp b/user.cpp index fce7446..19fcde1 100755 --- a/user.cpp +++ b/user.cpp @@ -2,36 +2,36 @@ #include #include "user.h" -User::User(){ - name = ""; - password = ""; - phone_number = ""; - fax_number = ""; - postal_address = ""; - is_admin = false; -} +// User::User(){ + // name = ""; + // password = ""; + // phone_number = ""; + // fax_number = ""; + // postal_address = ""; + // is_admin = false; +// } -User::User(string n, string pass, string phone, string fax, string postal, bool admin){ - name = n; - password = pass; - phone_number = phone; - fax_number = fax; - postal_address = postal; - is_admin = admin; -} +// User::User(string n, string pass, string phone, string fax, string postal, bool admin){ + // name = n; + // password = pass; + // phone_number = phone; + // fax_number = fax; + // postal_address = postal; + // is_admin = admin; +// } -string User::getName() {return name;} -string User::getPassword() {return password;} -string User::getPhoneNumber() {return phone_number;} -string User::getFaxNumber() {return fax_number;} -string User::getPostalAddress() {return postal_address;} -bool User::confirmAdmin() {return is_admin;} -bool User::checkLogin() {return is_logged_in;} -vector User::getGroups(){return groups;} -vector User::getMessages(){return messages;} +// string User::getName() {return name;} +// string User::getPassword() {return password;} +// string User::getPhoneNumber() {return phone_number;} +// string User::getFaxNumber() {return fax_number;} +// string User::getPostalAddress() {return postal_address;} +// bool User::confirmAdmin() {return is_admin;} +// bool User::checkLogin() {return is_logged_in;} +// vector User::getGroups(){return groups;} +// vector User::getMessages(){return messages;} -void User::setName(string new_name) {name = new_name;} -void User::setPassword(string new_password) {password = new_password;} -void User::setPhone(string new_phone) {phone_number = new_phone;} -void User::setFax(string new_fax) {fax_number = new_fax;} -void User::setPostal(string new_postal) {postal_address = new_postal;} +// void User::setName(string new_name) {name = new_name;} +// void User::setPassword(string new_password) {password = new_password;} +// void User::setPhone(string new_phone) {phone_number = new_phone;} +// void User::setFax(string new_fax) {fax_number = new_fax;} +// void User::setPostal(string new_postal) {postal_address = new_postal;} diff --git a/user.h b/user.h index c9dcfc8..f9897c0 100755 --- a/user.h +++ b/user.h @@ -2,43 +2,43 @@ #include #include -class User { - string name; - string password; - string phone_number; - string fax_number; - string postal_address; - vector groups; - vector messages; +// class User { + // string name; + // string password; + // string phone_number; + // string fax_number; + // string postal_address; + // vector groups; + // vector messages; - bool is_admin; - bool is_logged_in; + // bool is_admin; + // bool is_logged_in; -public: - User(); - User(string n, string pass, string phone, string fax, string postal, bool admin); - string getName(); - string getPassword(); - string getPhoneNumber(); - string getFaxNumber(); - string getPostalAddress(); - vector getGroups(); - vector getMessages(); - bool confirmAdmin(); - bool checkLogin(); - void setName(string new_name); - void setPassword(string new_name); - void setPhone(string new_phone); - void setFax(string new_fax); - void setPostal(string new_postal); -}; +// public: + // User(); + // User(string n, string pass, string phone, string fax, string postal, bool admin); + // string getName(); + // string getPassword(); + // string getPhoneNumber(); + // string getFaxNumber(); + // string getPostalAddress(); + // vector getGroups(); + // vector getMessages(); + // bool confirmAdmin(); + // bool checkLogin(); + // void setName(string new_name); + // void setPassword(string new_name); + // void setPhone(string new_phone); + // void setFax(string new_fax); + // void setPostal(string new_postal); +// }; -class Message { - string timestamp; - string text; +// class Message { + // string timestamp; + // string text; -public: - Message(); - Message(string time, string t); -}; +// public: + // Message(); + // Message(string time, string t); +// };