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
|
- instances (verbs)
- objects (nouns)
- sentence = verb + nouns
=> separate documents from session information
generic data store, convention for how entries look like
distinguish records by type
records have metadata and optionally data
- create(metadata, data):
- add new entry, assign ids
- data='' indicates no data to store
- bad design? (data OOB)
- add_version(tree_id, parent_id, metadata, data)
- add new version to existing object
- change_metadata(tree_id, version_id, metadata)
- change the metadata of an existing version
- restore(tree_id, parent_id, version_id, metadata, data)
- add a new version with the given ids
- there must be no existing entry with the same (tree_id, version_id)
- if parent_id != '' there must be an existing entry (tree_id, parent_id)
- if parent_id = '', there must be no existing entry with the same tree_id and no parent_id
|