[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:
LDA 2024-08-07 20:45:53 +02:00
parent 87d9421f11
commit b87979e9a2
7 changed files with 998 additions and 979 deletions

39
src/Db/LMDB.c Normal file
View 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