| 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; |
nothing calls this directly
no test coverage detected