Update Parserv2.cpp

This commit is contained in:
scho4077 2015-09-22 21:53:35 -05:00
parent 74bc10d0ad
commit db3469594a

View file

@ -143,6 +143,7 @@ vector<string> closeCMD(vector<string> input){
cout << "\nPassing the following arguments to dbEngine: " << endl; cout << "\nPassing the following arguments to dbEngine: " << endl;
cout << "command :" << input[0] << endl; cout << "command :" << input[0] << endl;
cout << "relation: " << input[1] << endl; cout << "relation: " << input[1] << endl;
return input;
} }
vector<string> saveCMD(vector<string> input){ vector<string> saveCMD(vector<string> input){
@ -154,14 +155,26 @@ vector<string> saveCMD(vector<string> input){
cout << "\nPassing the following arguments to dbEngine: " << endl; cout << "\nPassing the following arguments to dbEngine: " << endl;
cout << "command :" << input[0] << endl; cout << "command :" << input[0] << endl;
cout << "relation: " << input[1] << endl; cout << "relation: " << input[1] << endl;
return input;
} }
vector<string> updateCMD(vector<string> input){ vector<string> updateCMD(vector<string> input){
// //UPDATE relation-name SET attribute-name = literal { , attribute-name = literal } WHERE condition
} }
vector<string> deleteCMD(vector<string> input){ vector<string> deleteCMD(vector<string> input){
// //DELETE FROM relation-name WHERE condition
if (input[0] != "DELETE") {
cout << "Error: save keyword is missing." <<endl;
return input;
}
cout << "\nPassing the following arguments to dbEngine: " << endl;
cout << "command :" << input[0] << endl;
cout << "relation: " << input[1] << endl;
for (int i = 0; i < input.size(); ++i) {
cout << input[i] << "\n";
}
} }
int main () { int main () {