Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
marcelb | 475c33651c | 1 year ago |
@ -1 +0,0 @@ |
|||||||
*.o |
|
@ -1,15 +1,6 @@ |
|||||||
{ |
{ |
||||||
"files.associations": { |
"files.associations": { |
||||||
"string": "cpp", |
"string": "cpp", |
||||||
"vector": "cpp", |
"vector": "cpp" |
||||||
"*.tcc": "cpp", |
|
||||||
"deque": "cpp", |
|
||||||
"unordered_map": "cpp", |
|
||||||
"system_error": "cpp", |
|
||||||
"iostream": "cpp", |
|
||||||
"type_traits": "cpp", |
|
||||||
"tuple": "cpp", |
|
||||||
"array": "cpp", |
|
||||||
"utility": "cpp" |
|
||||||
} |
} |
||||||
} |
} |
Binary file not shown.
@ -1,32 +1,25 @@ |
|||||||
#include <iostream> |
#include <iostream> |
||||||
using namespace std; |
|
||||||
|
|
||||||
|
#include "../lib/sql3.hpp" |
||||||
|
|
||||||
#include "../lib/sqlite3.hpp" |
using namespace std; |
||||||
using namespace marcelb::SQlite3; |
|
||||||
|
|
||||||
int main() { |
int main() { |
||||||
try { |
|
||||||
|
|
||||||
SQLite3 mydb("../example/example.db", false); |
sql3 mydb("../example/example.db", false); |
||||||
|
|
||||||
// cout << mydb.ask("Select * from Tab1");
|
// cout << mydb.ask("Select * from Tab1");
|
||||||
// cout << mydb.ask("INSERT INTO Tab1 VALUES(3,'Pakora', 'marijanab@bitelex.ml');");
|
// cout << mydb.ask("INSERT INTO Tab1 VALUES(3,'Pakora', 'marijanab@bitelex.ml');");
|
||||||
|
|
||||||
auto res = mydb.query("Select * from Tab1"); |
auto res = mydb.query("Select * from Tab1"); |
||||||
// cout << endl << res["NAME"][1];
|
// auto res = mydb.query("INSERT INTO Tab1 VALUES(4,'Mare', 'marijanab@bitelex.co');");
|
||||||
|
|
||||||
// cout << endl << res["MAIL"][1];
|
for (auto i : res)
|
||||||
|
for (auto j: i.second) |
||||||
for (auto i : res) { |
|
||||||
for (auto j: i.second) { |
|
||||||
cout << i.first << " : " << j << endl; |
cout << i.first << " : " << j << endl; |
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} catch (const string err) { |
|
||||||
cout << err << endl; |
// cout << endl << res["NAME"][1];
|
||||||
} |
|
||||||
|
|
||||||
return 0; |
return 0; |
||||||
} |
} |
Binary file not shown.
Loading…
Reference in new issue