Library for easy work with SQLite 3 database
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sql3/test/test.cpp

25 lines
589 B

1 year ago
#include <iostream>
#include "../lib/sql3.hpp"
using namespace std;
int main() {
sql3 mydb("../example/example.db", false);
1 year ago
// cout << mydb.ask("Select * from Tab1");
1 year ago
// 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');");
1 year ago
// for (auto i : res)
// for (auto j: i.second)
// cout << i.first << " : " << j << endl;
// cout << endl << res["NAME"][1];
1 year ago
return 0;
}