Skip to content

Commit 1dde3d9

Browse files
committed
Update Readme
1 parent cc1b105 commit 1dde3d9

File tree

1 file changed

+10
-27
lines changed

1 file changed

+10
-27
lines changed

README.md

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ itself a port of [xitdb](https://github.com/radarroark/xitdb), written in Zig.
2121

2222
`xitdb-clj` provides atom-like semantics when working with the database from Clojure.
2323

24+
[![Clojars Project](https://img.shields.io/clojars/v/io.github.codeboost/xitdb-clj.svg)](https://clojars.org/io.github.codeboost/xitdb-clj)
25+
2426
## Main characteristics
2527

2628
- Embeddable, tiny library.
@@ -34,7 +36,7 @@ itself a port of [xitdb](https://github.com/radarroark/xitdb), written in Zig.
3436

3537
## Architecture
3638

37-
`xitdb-clj` builds on `xitdb-java` which implements:
39+
`xitdb-clj` builds on [xitdb-java](https://github.com/radarroark/xitdb-java) which implements:
3840

3941
- **Hash Array Mapped Trie (HAMT)** - For efficient map and set operations
4042
- **RRB Trees** - For vector operations with good concatenation performance
@@ -47,20 +49,23 @@ The Clojure wrapper adds:
4749
- Thread-local read connections for scalability
4850
- Integration with Clojure's sequence abstractions
4951

50-
## Why you always wanted this in your life
52+
## Quickstart
53+
54+
Add the dependency to your project, start a REPL.
5155

5256
### You already know how to use it!
5357

54-
For the programmer, a `xitdb` database behaves exactly like a Clojure atom.
58+
For the programmer, a `xitdb` database is like a Clojure atom.
5559
`reset!` or `swap!` to reset or update, `deref` or `@` to read.
5660

5761
```clojure
62+
(require '[xitdb.db :as xdb])
5863
(def db (xdb/xit-db "my-app.db"))
5964
;; Use it like an atom
6065
(reset! db {:users {"alice" {:name "Alice" :age 30}
6166
"bob" {:name "Bob" :age 25}}})
6267
;; Read the entire database
63-
(common/materialize @db)
68+
(xdb/materialize @db)
6469
;; => {:users {"alice" {:name "Alice", :age 30}, "bob" {:name "Bob", :age 25}}}
6570

6671
(get-in @db [:users "alice" :age])
@@ -168,15 +173,6 @@ values of the database, by setting the `*return-history?*` binding to `true`.
168173
- **File-based** - Data persisted to disk with crash recovery
169174
- **In-memory** - Fast temporary storage for testing or caching
170175

171-
172-
## Installation
173-
174-
Add to your `deps.edn`:
175-
176-
```clojure
177-
{:deps {io.github.codeboost/xitdb-clj {:mvn/version "0.1.0"}}}
178-
```
179-
180176
## Examples
181177

182178
### User Management System
@@ -232,20 +228,7 @@ Add to your `deps.edn`:
232228
- **Memory Usage**: Minimal overhead with automatic deduplication of identical subtrees
233229
- **Concurrency**: Thread-safe with optimized read-write locks
234230

235-
## Testing
236-
237-
Run the test suite:
238-
239-
```bash
240-
clojure -M:test
241-
```
242-
243-
244-
## Contributing
245-
246-
This project welcomes contributions. Please ensure all tests pass and follow the existing code style.
247231

248232
## License
249233

250-
[License information needed]
251-
234+
MIT

0 commit comments

Comments
 (0)