Skip to content

Commit 73991ff

Browse files
committed
Fixed README
1 parent 6a53098 commit 73991ff

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,8 @@ If your columns may have flexible types, you can use C++17's `std::variant` to e
342342
343343
```c++
344344
db << "CREATE TABLE tbl (id integer, data);";
345-
db << "INSERT INTO tbl VALUES (?, ?, ?);" << 1 << vector<int> { 1, 2, 3};
346-
unique_ptr<string> ptr_null; // you can even bind empty unique_ptr<T>
347-
db << "INSERT INTO tbl VALUES (?, ?, ?);" << 2 << 2.5;
345+
db << "INSERT INTO tbl VALUES (?, ?);" << 1 << vector<int> { 1, 2, 3};
346+
db << "INSERT INTO tbl VALUES (?, ?);" << 2 << 2.5;
348347
349348
db << "select data from tbl where id = 1"
350349
>> [](std::variant<vector<int>, double> data) {
@@ -355,7 +354,7 @@ db << "select data from tbl where id = 1"
355354
for(auto i : get<vector<int>>(data)) cout << i << ","; cout << endl;
356355
};
357356
358-
db << "select age,name,img from tbl where id = 2"
357+
db << "select data from tbl where id = 2"
359358
>> [](std::variant<vector<int>, double> data) {
360359
if(data.index() != 2) {
361360
cerr << "ERROR: we expected a real number" << std::endl;

0 commit comments

Comments
 (0)