| 108 | } |
| 109 | |
| 110 | bool del(const char* key) { |
| 111 | assert(cursor_); |
| 112 | cursor_->set_key(cursor_, key); |
| 113 | int ret = cursor_->remove(cursor_); |
| 114 | if (ret != 0) { |
| 115 | printf("remove %s failed, ret=%d\r\n", key, ret); |
| 116 | return false; |
| 117 | } |
| 118 | |
| 119 | cursor_->reset(cursor_); |
| 120 | return true; |
| 121 | } |
| 122 | |
| 123 | private: |
| 124 | wdb& db_; |