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