WIP query functs

This commit is contained in:
MassiveAtoms
2019-07-01 11:04:35 -03:00
parent 5f4a09d018
commit 450ffc9588
7 changed files with 94 additions and 16 deletions

View File

@ -1,5 +1,6 @@
#include "headers/Park_spot.h"
#include "headers/Query.h"
#include <array>
#include <thread>
@ -28,20 +29,33 @@ a wait function where 1 sec represents 1 hour irl.
int main() {
class Customer sagar {
"Sagar Ramsaransing", Verhicle_type::bike
"query", Verhicle_type::bike
};
sagar.update_db();
Park_spot p1;
p1.clock(&sagar); // in
Wait(2);
p1.clock(&sagar);
// Wait(2);
// p1.clock(&sagar);
string a = hash_password("test");
string b = hash_password("test");
string c = hash_password("test");
string d = hash_password("tast");
cout << a << "\n" << b << "\n" << c << "\n";
cout << verify_password(a, "test") << ","
<< verify_password(b, "test") << ", "
<< verify_password(c, "test") << ", "
<< verify_password(d, "test");
}
Wait(2);
p1.clock(&sagar); // in
Wait(2);
p1.clock(&sagar);
Wait(2);
p1.clock(&sagar); // in
Wait(2);
p1.clock(&sagar);
Wait(2);
vector<Customer> test = query_customer_with_name("query");
if (!test.size()){
cout << "No customers with this name found;";
}
else if (test.size()==1) {
cout << "1 customer found;";
}
else {
cout << "MORE customers found?";
}
}