Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 39 lines (28 sloc) 0.955 kB
8113897 @Licenser first commit
authored
1 # stupiddb
2
f9f5709 @Licenser Fixed readme.
authored
3 A very simple DB in clojure.
4
5 Features:
40f1007 Added a doc-string for dissoc-in.
MayDaniel authored
6 * Only 7 + 2 functions.
f9f5709 @Licenser Fixed readme.
authored
7 * Simple setup. (one of the +2 functions)
8 * No finalizing code needed but possible. (second of the +2 functions can be omitted)
9 * Crash save, the db is logging!
10 * Thread save, thanks to clojures great concurrencly models.
11 * Might even be ACID complient :P.
12 * GZip support for space and IO performance.
13
14 Main Feature:
15 * You should not really have to worry about the features, it should just work.
16
8113897 @Licenser first commit
authored
17
18 ## Usage
c2fe7e1 @Licenser There a simple DB.
authored
19 ;use the namespace
20 (use 'stupiddb.core)
21 ;; create / init / load a db that saves every 30 seconds
f9f5709 @Licenser Fixed readme.
authored
22 (def db (db-init "my-db-file.db" 30))
c2fe7e1 @Licenser There a simple DB.
authored
23 ;; work with it
24 (db-assoc db :key :value)
25 (db-get db :key)
f9f5709 @Licenser Fixed readme.
authored
26 (db-dissoc db :key)
8113897 @Licenser first commit
authored
27
c2fe7e1 @Licenser There a simple DB.
authored
28 ;close the db - you don't have to do this if your programm ends here it will just stop the DB from saving
f9f5709 @Licenser Fixed readme.
authored
29 (db-close db)
8113897 @Licenser first commit
authored
30
31 ## Installation
32
c2fe7e1 @Licenser There a simple DB.
authored
33 use lein-search :P
8113897 @Licenser first commit
authored
34
35 ## License
36
c2fe7e1 @Licenser There a simple DB.
authored
37 Copyright 2010, Heinz N. Gies
38 This code is under the same license as clojure, the EPL.
Something went wrong with that request. Please try again.