• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

docs/H03-May-2022-628421

.gitignoreH A D16-Jul-2021119 1615

LICENSEH A D16-Jul-20211 KiB2217

MakefileH A D03-May-20221.7 KiB8866

README.mdH A D16-Jul-20211.2 KiB3727

config.h.inH A D16-Jul-2021388 2516

fixed_index.cH A D16-Jul-20219.8 KiB325290

fixed_index.hH A D16-Jul-2021860 3120

fixed_store.cH A D16-Jul-20216.2 KiB190174

fixed_store.hH A D16-Jul-2021623 2414

radb.hH A D16-Jul-2021141 107

string_index.cH A D16-Jul-20219.7 KiB322286

string_index.hH A D16-Jul-20211 KiB3221

string_store.cH A D16-Jul-202120.9 KiB598564

string_store.hH A D16-Jul-20211.7 KiB4732

README.md

1# Radb
2Raja's Attempt at a Database
3
4## About
5
6`radb` provides a simple but fast data storage library that can be embedded into a
7C application. It intentionally only provides a limited number of functions.
8
9## Usage
10
11```c
12string_index_t *string_index_create(const char *Prefix, size_t ChunkSize);
13string_index_t *string_index_open(const char *Prefix);
14void string_index_close(string_index_t *Index);
15
16size_t string_index_insert(string_index_t *Index, const void *Key);
17size_t string_index_search(string_index_t *Store, const void *Key);
18```
19
20```c
21string_store_t *string_store_create(const char *Prefix, size_t RequestedSize, size_t ChunkSize);
22string_store_t *string_store_open(const char *Prefix);
23void string_store_close(string_store_t *Store);
24
25size_t string_store_get_size(string_store_t *Store, size_t Index);
26void string_store_get_value(string_store_t *Store, size_t Index, void *Buffer);
27void string_store_set(string_store_t *Store, size_t Index, const void *Buffer, size_t Length);
28```
29
30```c
31fixed_store_t *fixed_store_create(const char *Prefix, size_t RequestedSize, size_t ChunkSize);
32fixed_store_t *fixed_store_open(const char *Prefix);
33void fixed_store_close(fixed_store_t *Store);
34
35void *fixed_store_get(fixed_store_t *Store, size_t Index);
36```
37