MCPcopy Create free account
hub / github.com/acl-dev/acl / dbdel

Method dbdel

lib_acl_cpp/samples/benchmark/sqlite/main.cpp:110–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108 }
109
110 int dbdel(acl::db_handle& db, int max) {
111 acl::string sql, key;
112 int n = 0;
113 for (int i = 0; i < max; i++) {
114 key.format("key-%d", i);
115 sql.format("delete from tbl_test where key='%s'",
116 key.c_str());
117 if (db.sql_update(sql) == false) {
118 printf("sql_update: |%s| error\r\n", sql.c_str());
119 return -1;
120 }
121 n += db.affect_count();
122 }
123
124 return n;
125 }
126
127 bool tbl_create(acl::db_handle& db, const char* tbl_name) {
128 if (db.tbl_exists(tbl_name)) {

Callers

nothing calls this directly

Calls 4

formatMethod · 0.45
c_strMethod · 0.45
sql_updateMethod · 0.45
affect_countMethod · 0.45

Tested by

no test coverage detected