Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
marcelb | 5fde5c52aa | 1 week ago |
marcelb | 9fa9178e32 | 1 year ago |
marcelb | 4fd86cc606 | 1 year ago |
marcelb | d3726df3e3 | 1 year ago |
marcelb | 8e9abb6e56 | 1 year ago |
marcelb | 11348539d3 | 1 year ago |
marcelb | 3a67bf47c2 | 1 year ago |
@ -0,0 +1 @@ |
||||
*.o |
@ -1,6 +1,15 @@ |
||||
{ |
||||
"files.associations": { |
||||
"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,25 +1,32 @@ |
||||
#include <iostream> |
||||
using namespace std; |
||||
|
||||
#include "../lib/sql3.hpp" |
||||
|
||||
using namespace std; |
||||
#include "../lib/sqlite3.hpp" |
||||
using namespace marcelb::SQlite3; |
||||
|
||||
int main() { |
||||
try { |
||||
|
||||
sql3 mydb("../example/example.db", false); |
||||
SQLite3 mydb("../example/example.db", false); |
||||
|
||||
// cout << mydb.ask("Select * from Tab1");
|
||||
// cout << mydb.ask("INSERT INTO Tab1 VALUES(3,'Pakora', 'marijanab@bitelex.ml');");
|
||||
|
||||
auto res = mydb.query("Select * from Tab1"); |
||||
// auto res = mydb.query("INSERT INTO Tab1 VALUES(4,'Mare', 'marijanab@bitelex.co');");
|
||||
// cout << endl << res["NAME"][1];
|
||||
|
||||
for (auto i : res)
|
||||
for (auto j: i.second) |
||||
cout << i.first << " : " << j << endl; |
||||
// cout << endl << res["MAIL"][1];
|
||||
|
||||
for (auto i : res) { |
||||
for (auto j: i.second) { |
||||
cout << i.first << " : " << j << endl;
|
||||
} |
||||
} |
||||
|
||||
// cout << endl << res["NAME"][1];
|
||||
} catch (const string err) { |
||||
cout << err << endl; |
||||
} |
||||
|
||||
return 0; |
||||
} |
Binary file not shown.
Loading…
Reference in new issue