mirror of
https://git.telodendria.io/Telodendria/Cytoplasm.git
synced 2025-04-25 10:26:03 +00:00
[MOD/WIP] Start separating the main DB API
Not everything is available as of now, I'm still working on it, but it builds and seems to work, and its 9PM, so that's worthapush.
This commit is contained in:
parent
87d9421f11
commit
b87979e9a2
7 changed files with 998 additions and 979 deletions
39
src/Db/LMDB.c
Normal file
39
src/Db/LMDB.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
#include <Memory.h>
|
||||
|
||||
#include <Db.h>
|
||||
|
||||
#include "Db/Internal.h"
|
||||
|
||||
#ifdef EDB_LMDB
|
||||
|
||||
typedef struct LMDB {
|
||||
Db base; /* The base implementation required to pass */
|
||||
} LMDB;
|
||||
Db *
|
||||
DbOpenLMDB(char *dir, size_t size)
|
||||
{
|
||||
/* TODO */
|
||||
LMDB *db;
|
||||
if (!dir || !size)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
db = Malloc(sizeof(*db));
|
||||
DbInit(db);
|
||||
|
||||
(void) size;
|
||||
(void) dir;
|
||||
return db;
|
||||
}
|
||||
|
||||
#else
|
||||
Db *
|
||||
DbOpenLMDB(char *dir, size_t size)
|
||||
{
|
||||
/* Unimplemented function */
|
||||
(void) size;
|
||||
(void) dir;
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue