Delete a record from the Store.
More...
|
static int | store_bdb_delete_record (void *store, const char *key, size_t klen) |
| Implements StoreOps::delete_record() -. More...
|
|
static int | store_gdbm_delete_record (void *store, const char *key, size_t klen) |
| Implements StoreOps::delete_record() -. More...
|
|
static int | store_kyotocabinet_delete_record (void *store, const char *key, size_t klen) |
| Implements StoreOps::delete_record() -. More...
|
|
static int | store_lmdb_delete_record (void *store, const char *key, size_t klen) |
| Implements StoreOps::delete_record() -. More...
|
|
static int | store_qdbm_delete_record (void *store, const char *key, size_t klen) |
| Implements StoreOps::delete_record() -. More...
|
|
static int | store_rocksdb_delete_record (void *store, const char *key, size_t klen) |
| Implements StoreOps::delete_record() -. More...
|
|
static int | store_tokyocabinet_delete_record (void *store, const char *key, size_t klen) |
| Implements StoreOps::delete_record() -. More...
|
|
static int | store_tdb_delete_record (void *store, const char *key, size_t klen) |
| Implements StoreOps::delete_record() -. More...
|
|
Delete a record from the Store.
- Parameters
-
[in] | store | Store retrieved via open() |
[in] | key | Key identifying the record |
[in] | klen | Length of the Key string |
- Return values
-
0 | Success |
num | Error, a backend-specific error code |
◆ store_bdb_delete_record()
static int store_bdb_delete_record |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen |
|
) |
| |
|
static |
Implements StoreOps::delete_record() -.
Definition at line 212 of file bdb.c.
221 dbt_init(&dkey, (
void *) key, klen);
222 return ctx->
db->del(ctx->
db, NULL, &dkey, 0);
static void dbt_init(DBT *dbt, void *data, size_t len)
Initialise a BDB context.
◆ store_gdbm_delete_record()
static int store_gdbm_delete_record |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen |
|
) |
| |
|
static |
◆ store_kyotocabinet_delete_record()
static int store_kyotocabinet_delete_record |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen |
|
) |
| |
|
static |
Implements StoreOps::delete_record() -.
Definition at line 113 of file kc.c.
119 if (!kcdbremove(db, key, klen))
121 int ecode = kcdbecode(db);
122 return ecode ? ecode : -1;
◆ store_lmdb_delete_record()
static int store_lmdb_delete_record |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen |
|
) |
| |
|
static |
Implements StoreOps::delete_record() -.
Definition at line 270 of file lmdb.c.
279 dkey.mv_data = (
void *) key;
282 if (rc != MDB_SUCCESS)
287 rc = mdb_del(ctx->
txn, ctx->
db, &dkey, NULL);
288 if ((rc != MDB_SUCCESS) && (rc != MDB_NOTFOUND))
291 mdb_txn_abort(ctx->
txn);
#define mutt_debug(LEVEL,...)
static int mdb_get_w_txn(struct StoreLmdbCtx *ctx)
Get an LMDB write transaction.
@ TXN_UNINITIALIZED
Transaction is uninitialised.
@ LL_DEBUG2
Log at debug level 2.
◆ store_qdbm_delete_record()
static int store_qdbm_delete_record |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen |
|
) |
| |
|
static |
Implements StoreOps::delete_record() -.
Definition at line 93 of file qdbm.c.
101 bool success = vlout(db, key, klen);
102 return success ? 0 : dpecode ? dpecode : -1;
◆ store_rocksdb_delete_record()
static int store_rocksdb_delete_record |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen |
|
) |
| |
|
static |
◆ store_tokyocabinet_delete_record()
static int store_tokyocabinet_delete_record |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen |
|
) |
| |
|
static |
Implements StoreOps::delete_record() -.
Definition at line 105 of file tc.c.
111 if (!tcbdbout(db, key, klen))
113 int ecode = tcbdbecode(db);
114 return ecode ? ecode : -1;
◆ store_tdb_delete_record()
static int store_tdb_delete_record |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen |
|
) |
| |
|
static |
Implements StoreOps::delete_record() -.
Definition at line 106 of file tdb.c.
111 TDB_CONTEXT *db = store;
114 dkey.dptr = (
unsigned char *) key;
117 return tdb_delete(db, dkey);