WIP query functs
This commit is contained in:
42
main.cpp
42
main.cpp
@ -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?";
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user