MCPcopy Create free account
hub / github.com/SqliteModernCpp/sqlite_modern_cpp / insert

Function insert

tests/boost_optional.cc:10–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8using namespace std;
9
10void insert(database& db, bool is_null) {
11 int id = 1;
12 boost::optional<int> val;
13 if(!is_null) val = 5;
14
15 db << "delete from test where id = 1";
16 db << "insert into test(id,val) values(?,?)" << id << val;
17}
18
19void select(database& db, bool should_be_null) {
20 db << "select id,val from test" >> [&](long long, boost::optional<int> val) {

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected