/
README
38 lines (28 loc) · 955 Bytes
/
README
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
34
35
36
37
38
# stupiddb
A very simple DB in clojure.
Features:
* Only 7 + 2 functions.
* Simple setup. (one of the +2 functions)
* No finalizing code needed but possible. (second of the +2 functions can be omitted)
* Crash save, the db is logging!
* Thread save, thanks to clojures great concurrencly models.
* Might even be ACID complient :P.
* GZip support for space and IO performance.
Main Feature:
* You should not really have to worry about the features, it should just work.
## Usage
;use the namespace
(use 'stupiddb.core)
;; create / init / load a db that saves every 30 seconds
(def db (db-init "my-db-file.db" 30))
;; work with it
(db-assoc db :key :value)
(db-get db :key)
(db-dissoc db :key)
;close the db - you don't have to do this if your programm ends here it will just stop the DB from saving
(db-close db)
## Installation
use lein-search :P
## License
Copyright 2010, Heinz N. Gies
This code is under the same license as clojure, the EPL.