NeoMutt  2024-03-23-23-gec7045
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
rocksdb.c File Reference

RocksDB backend for the key/value Store. More...

#include "config.h"
#include <stddef.h>
#include <rocksdb/c.h>
#include "mutt/lib.h"
#include "lib.h"
+ Include dependency graph for rocksdb.c:

Go to the source code of this file.

Data Structures

struct  RocksDbStoreData
 RocksDB store. More...
 

Macros

#define RDBVER(major, minor, patch)   #major "." #minor "." #patch
 

Functions

static void rocksdb_sdata_free (struct RocksDbStoreData **ptr)
 Free RocksDb Store Data.
 
static struct RocksDbStoreDatarocksdb_sdata_new (void)
 Create new RocksDb Store Data.
 
static StoreHandlestore_rocksdb_open (const char *path)
 Open a connection to a Store - Implements StoreOps::open() -.
 
static void * store_rocksdb_fetch (StoreHandle *store, const char *key, size_t klen, size_t *vlen)
 Fetch a Value from the Store - Implements StoreOps::fetch() -.
 
static void store_rocksdb_free (StoreHandle *store, void **ptr)
 Free a Value returned by fetch() - Implements StoreOps::free() -.
 
static int store_rocksdb_store (StoreHandle *store, const char *key, size_t klen, void *value, size_t vlen)
 Write a Value to the Store - Implements StoreOps::store() -.
 
static int store_rocksdb_delete_record (StoreHandle *store, const char *key, size_t klen)
 Delete a record from the Store - Implements StoreOps::delete_record() -.
 
static void store_rocksdb_close (StoreHandle **ptr)
 Close a Store connection - Implements StoreOps::close() -.
 
static const char * store_rocksdb_version (void)
 Get a Store version string - Implements StoreOps::version() -.
 

Detailed Description

RocksDB backend for the key/value Store.

Authors
  • Tino Reichardt
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file rocksdb.c.

Macro Definition Documentation

◆ RDBVER

#define RDBVER (   major,
  minor,
  patch 
)    #major "." #minor "." #patch

Function Documentation

◆ rocksdb_sdata_free()

static void rocksdb_sdata_free ( struct RocksDbStoreData **  ptr)
static

Free RocksDb Store Data.

Parameters
ptrRocksDb Store Data to free

Definition at line 53 of file rocksdb.c.

54{
55 if (!ptr || !*ptr)
56 return;
57
58 struct RocksDbStoreData *sdata = *ptr;
59 FREE(&sdata->err);
60
61 FREE(ptr);
62}
#define FREE(x)
Definition: memory.h:45
RocksDB store.
Definition: rocksdb.c:41
char * err
Definition: rocksdb.c:46
+ Here is the caller graph for this function:

◆ rocksdb_sdata_new()

static struct RocksDbStoreData * rocksdb_sdata_new ( void  )
static

Create new RocksDb Store Data.

Return values
ptrNew RocksDb Store Data

Definition at line 68 of file rocksdb.c.

69{
70 return mutt_mem_calloc(1, sizeof(struct RocksDbStoreData));
71}
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function: