Skip to content

Commit 91d2fb3

Browse files
authored
Update README.md
1 parent 04064c1 commit 91d2fb3

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ SariDB is a minimalist, file-reconstructible key-value database. It can be embed
1919
- **Concurrency First:** SariDB provides built-in concurrency safety mechanisms, allowing multiple threads to operate on the database simultaneously without compromising data consistency.
2020

2121
## Usage Example
22-
(Subject to change)
22+
23+
### Embedded Example
2324

2425
```java
2526
SariDB sariDB = SariDB
@@ -28,12 +29,27 @@ SariDB sariDB = SariDB
2829
.filePath("path/to/db.parquet") // Save your .parquet wherever!
2930
.reconstruct(false) // Reconstruct or start anew?
3031
.build(); // That's all folks.
31-
sariDB.start(); // 🚀
32+
33+
sariDB.set("key", "someValue")
34+
sariDB.get("key") // returns "someValue"
35+
```
36+
37+
### Standalone Example
38+
```java
39+
SariDB sariDB = SariDB
40+
.builder()
41+
.isEmbedded(true) // Embedded or standalone?
42+
.filePath("path/to/db.parquet") // Save your .parquet wherever!
43+
.reconstruct(false) // Reconstruct or start anew?
44+
.portNumber(1337) // Set the port number..
45+
.build(); // ..And that's all folks!
46+
sariDB.start(); // Listening on port 1337 🚀!
47+
3248
```
3349

3450

35-
## Add to your project (NOT YET IMPLEMENTED -- SOON!)
36-
## Downloads
51+
## Add to your project (NOT YET IMPLEMENTED)
52+
### Downloads
3753

3854
[Download latest version (Not yet implemented)](https://google.com) or add to `pom.xml`:
3955

0 commit comments

Comments
 (0)