Fetch a Value from the Store.
More...
|
static void * | store_bdb_fetch (void *store, const char *key, size_t klen, size_t *vlen) |
| Implements StoreOps::fetch() -. More...
|
|
static void * | store_gdbm_fetch (void *store, const char *key, size_t klen, size_t *vlen) |
| Implements StoreOps::fetch() -. More...
|
|
static void * | store_kyotocabinet_fetch (void *store, const char *key, size_t klen, size_t *vlen) |
| Implements StoreOps::fetch() -. More...
|
|
static void * | store_lmdb_fetch (void *store, const char *key, size_t klen, size_t *vlen) |
| Implements StoreOps::fetch() -. More...
|
|
static void * | store_qdbm_fetch (void *store, const char *key, size_t klen, size_t *vlen) |
| Implements StoreOps::fetch() -. More...
|
|
static void * | store_rocksdb_fetch (void *store, const char *key, size_t klen, size_t *vlen) |
| Implements StoreOps::fetch() -. More...
|
|
static void * | store_tokyocabinet_fetch (void *store, const char *key, size_t klen, size_t *vlen) |
| Implements StoreOps::fetch() -. More...
|
|
static void * | store_tdb_fetch (void *store, const char *key, size_t klen, size_t *vlen) |
| Implements StoreOps::fetch() -. More...
|
|
Fetch a Value from the Store.
- Parameters
-
[in] | store | Store retrieved via open() |
[in] | key | Key identifying the record |
[in] | klen | Length of the Key string |
[out] | vlen | Length of the Value |
- Return values
-
ptr | Success, Value associated with the Key |
NULL | Error, or Key not found |
◆ store_bdb_fetch()
static void* store_bdb_fetch |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen, |
|
|
size_t * |
vlen |
|
) |
| |
|
static |
Implements StoreOps::fetch() -.
Definition at line 158 of file bdb.c.
168 dbt_init(&dkey, (
void *) key, klen);
170 data.flags = DB_DBT_MALLOC;
172 ctx->
db->get(ctx->
db, NULL, &dkey, &data, 0);
static void dbt_empty_init(DBT *dbt)
Initialise an empty BDB context.
static void dbt_init(DBT *dbt, void *data, size_t len)
Initialise a BDB context.
◆ store_gdbm_fetch()
static void* store_gdbm_fetch |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen, |
|
|
size_t * |
vlen |
|
) |
| |
|
static |
Implements StoreOps::fetch() -.
Definition at line 60 of file gdbm.c.
70 dkey.dptr = (
char *) key;
72 data = gdbm_fetch(db, dkey);
◆ store_kyotocabinet_fetch()
static void* store_kyotocabinet_fetch |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen, |
|
|
size_t * |
vlen |
|
) |
| |
|
static |
◆ store_lmdb_fetch()
static void* store_lmdb_fetch |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen, |
|
|
size_t * |
vlen |
|
) |
| |
|
static |
Implements StoreOps::fetch() -.
Definition at line 189 of file lmdb.c.
199 dkey.mv_data = (
void *) key;
204 if (rc != MDB_SUCCESS)
210 rc = mdb_get(ctx->
txn, ctx->
db, &dkey, &data);
211 if (rc == MDB_NOTFOUND)
215 if (rc != MDB_SUCCESS)
221 *vlen = data.mv_size;
#define mutt_debug(LEVEL,...)
static int mdb_get_r_txn(struct StoreLmdbCtx *ctx)
Get an LMDB read transaction.
@ LL_DEBUG2
Log at debug level 2.
◆ store_qdbm_fetch()
static void* store_qdbm_fetch |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen, |
|
|
size_t * |
vlen |
|
) |
| |
|
static |
◆ store_rocksdb_fetch()
static void* store_rocksdb_fetch |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen, |
|
|
size_t * |
vlen |
|
) |
| |
|
static |
◆ store_tokyocabinet_fetch()
static void* store_tokyocabinet_fetch |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen, |
|
|
size_t * |
vlen |
|
) |
| |
|
static |
◆ store_tdb_fetch()
static void* store_tdb_fetch |
( |
void * |
store, |
|
|
const char * |
key, |
|
|
size_t |
klen, |
|
|
size_t * |
vlen |
|
) |
| |
|
static |
Implements StoreOps::fetch() -.
Definition at line 57 of file tdb.c.
62 TDB_CONTEXT *db = store;
66 dkey.dptr = (
unsigned char *) key;
68 data = tdb_fetch(db, dkey);