diff options
author | bpc2003 <wpesfriendnva@gmail.com> | 2025-03-14 16:27:23 -0400 |
---|---|---|
committer | bpc2003 <wpesfriendnva@gmail.com> | 2025-03-14 16:27:23 -0400 |
commit | a9d58b478e6db7d5bcda8e66d1441ea5baf7ebd0 (patch) | |
tree | 320a9f4730c39709b40758ddf45a260091a21a93 | |
parent | e85c835f659fa4887cf2423c8495de5c4d2b38ac (diff) |
Update README.md
-rw-r--r-- | README.md | 30 |
1 files changed, 24 insertions, 6 deletions
@@ -5,18 +5,33 @@ mdb is a simple embedded key-value database written in C. - [Installation](#Installation) - [Reference](#Reference) - [Removal](#Removal) -- [License](./LICENSE) +- [License](#License) ## Installation -In order to install mdb clone this repository then run: +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 +- GET: gets a given key-value pair 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 +#### Syntax +The basic layout of a command looks like this:\ +```cmd s/params/``` +- `cmd` represents the command you're trying to execute +- `s` represents the selector.\ +If `s` is a number, it will execute the command on that specific object.\ +If `s` is an `*` it will execute the command on every object. +- `/params/` represents any paramaters\ +that the command may need to execute properly.\ +All parameters are separated by a `/`. + +Examples: +- `GET *` - gets every key-value pair from every object. +- `SET 0/name:John` - sets the key `name` to the value `John` in object 0. +- `DEL */name` - deletes every key `name` from every object. ### API Reference There are six functions in mdb.h - readdb: reads a database from a given file @@ -27,7 +42,10 @@ There are six functions in mdb.h - delkey: deletes a given key-value pair from a given object ## Removal -In order to remove mdb run: -```sudo make remove``` -or +In order to remove mdb run:\ +```sudo make remove```\ +or run:\ ```sudo make uninstall``` + +## License +This software is licensed under the BSD-2-Clause [License]("./LICENSE") |