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

Method dbupdate

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

Source from the content-addressed store, hash-verified

92 }
93
94 int dbupdate(acl::db_handle& db, int max) {
95 acl::string sql, key, value;
96 for (int i = 0; i < max; i++) {
97 key.format("key-%d", i);
98 value.format("value-%d-%d", i, i);
99 sql.format("update tbl_test set value = '%s'"
100 " where key='%s'", value.c_str(), key.c_str());
101 if (db.sql_update(sql) == false) {
102 printf("sql_update: |%s| error\r\n", sql.c_str());
103 return -1;
104 }
105 }
106
107 return max;
108 }
109
110 int dbdel(acl::db_handle& db, int max) {
111 acl::string sql, key;

Callers

nothing calls this directly

Calls 3

formatMethod · 0.45
c_strMethod · 0.45
sql_updateMethod · 0.45

Tested by

no test coverage detected