summaryrefslogtreecommitdiff
path: root/README.md
blob: b6e5da3ef17c8e8e0c3628562f23b888aa1b18ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# mdb
mdb is a simple embedded key-value database written in C.

## Table of Contents
- [Installation](#Installation)
- [Reference](#Reference)
- [Removal](#Removal)
- [License](./LICENSE)

## Installation
In order to install mdb clone this repository then run:
```sudo make install```

## Reference
There are four basic commands in mdb:
- exit: exits the program
- GET: gets a given key from a given object
- SET: sets a given key-value pair in a given object
- DEL: deletes a given key-value pair from a given object
### API Reference
There are six functions in mdb.h
- readdb: reads a database from a given file
- writedb: writes a database to a given file
- getkeys: gets every key-value pair from a given object
- getkey: gets a single key-value pair from a given object
- setkey: sets a given key-value pair in a given object
- delkey: deletes a given key-value pair from a given object

## Removal
In order to remove mdb run:
```sudo make remove```
or
```sudo make uninstall```