this is a database for you to git clone and use in your project!
It is fast and it takes 2ms to return data. Also if you want to local store data on your pc of your users then you may want to use it.
``` use rust_store;
fn main() { ruststore::StateData { apikey: "yourapikey".tostring(), // make sure to change this to some key! // change this if your want but otherwise don't null: "nullnilvaluekey:345n,234lj52".tostring(), // make sure this file exists or the code will not work! datastoragelocation: "database/".tostring(), } .startdatabaseonline() }
```
=> GET / (index)
=> GET /read/<path>/<api_key> (read)
=> GET /add/<path>/<data_name>/<data>/<api_key> (add)
=> GET /delete/<path>/<api_key> (delete)
=> GET /null_write/<path>/<api_key> (null_write)
USE RUST NIGHTLY!!!!!!!
use ` instead of / to navgate directories.
This request will add data at ${yourdatabasefolder}/test/worked data.txt. The data.txt will have "this is going very well" stored.
http://localhost:8000/add/test`worked/data/this is going very well/your_api_key
This request will delete at ${yourdatabasefolder}/test/worked data.txt.
http://localhost:8000/delete/test`worked`data.txt/your_api_key
This request will read data at ${yourdatabasefolder}/test/worked data.txt.
http://localhost:8000/read/test`worked`data/your_api_key
This request will write null at ${yourdatabasefolder}/test/worked data.txt.
http://localhost:8000/null_write/test`worked`data.txt/your_api_key
Info on api
http://localhost:8000/
This database uses txt instead of csv or json because txt is the fastest way to read and write data.
This database uses a directory way just like you would do on a computer. This storage method automatically make files for you too!
This database requires your to put a directory (if you want to use a "/" use a "`" instead) and it return txt value by reading it line by line (a vec value).
This database has a write null feature to write a null key. If the null key is read when your read a txt it returns
{
"data" : "null"
"error" : "data is null"
}
make sure to handle error and check if error value equals "Success".
If the database work just as planned it returns
{
"error" : "Success"
}
otherwise it shows the error it received.
Dm me in discord at Carghai88#1468
I will respond as fast as possible just make sure it follows my ideology of speed!