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

Function insert

tests/std_optional.cc:9–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected