Update Parserv2.cpp
This commit is contained in:
parent
74bc10d0ad
commit
db3469594a
1 changed files with 15 additions and 2 deletions
17
Parserv2.cpp
17
Parserv2.cpp
|
@ -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 () {
|
||||||
|
|
Reference in a new issue