ll-database-binding: allow binding to build with older gdbm libraries
[apps/agl-service-data-persistence.git] / README.md
1
2 # Database Binding
3 This binding provide a database API with key/value semantics.
4 The backend is currently a Berkeley DB.
5
6 ## Verbs
7 * **insert**:
8         This verb insert a key/value pair in the database.
9         If the key already exist, the verb fails.
10         
11 * **update**:
12         This verb update an existing record.
13         If the key doesn't exist, the verb fails.
14         
15 * **delete**:
16         This verb remove an existing key/value pair from the database.
17         If no matching record is found, the verb fails.
18
19 * **read**:
20         This verb get the value associated with the specified key.
21         If no matching record is found, the verb fails.
22
23 ## Arguments
24 * The **read** and **delete** verbs need only a **key** to work:
25 ```
26 {
27         "key": "mykey"
28 }
29 ```
30
31 * The **insert** and **update** verbs need a **key** and a **value** to work:
32 ```
33 {
34         "key": "mykey",
35         "value": "my value"
36 }
37 ```
38 The **value** can be any valid json.