Add gitreview file for icefish branch
[apps/agl-service-data-persistence.git] / README.md
1
2 # Database Binding
3
4 This binding provide a database API with key/value semantics.
5 The backend is currently a Berkeley DB.
6
7 ## Verbs
8
9 * **insert**:
10
11     This verb insert a key/value pair in the database.
12     If the key already exist, the verb fails.
13
14 * **update**:
15
16     This verb update an existing record.
17     If the key doesn't exist, the verb fails.
18
19 * **delete**:
20
21     This verb remove an existing key/value pair from the database.
22     If no matching record is found, the verb fails.
23
24 * **read**:
25
26     This verb get the value associated with the specified key.
27     If no matching record is found, the verb fails.
28
29 ## Arguments
30
31 * The **read** and **delete** verbs need only a **key** to work:
32
33 ```code
34 {
35     "key": "mykey"
36 }
37 ```
38
39 * The **insert** and **update** verbs need a **key** and a **value** to work:
40
41 ```code
42 {
43     "key": "mykey",
44     "value": "my value"
45 }
46 ```
47
48 The **value** can be any valid json.
49
50 ## Dependencies
51
52 You must install BerkeleyDB and GDBM