use strings as values, with option to allow removing

This commit is contained in:
Dustin J. Mitchell
2019-12-29 11:50:05 -05:00
parent e5bd258e84
commit e83bdc28cd
6 changed files with 89 additions and 39 deletions

View File

@@ -15,8 +15,7 @@ The data model is only seen from the clients' perspective.
## Task Database
The task database is composed of an un-ordered collection of tasks, each keyed by a UUID.
Each task has an arbitrary-sized set of key/value properties, with JSON values.
A property with a `null` value is considered equivalent to that property not being set on the task.
Each task has an arbitrary-sized set of key/value properties, with string values.
Tasks are only created, never deleted.
See below for details on how tasks can "expire" from the task database.
@@ -31,7 +30,8 @@ Each operation has one of the forms
The former form creates a new task.
It is invalid to create a task that already exists.
The latter form updates the given property of the given task.
The latter form updates the given property of the given task, where property and value are both strings.
Value can also be `None` to indicate deletion of a property.
It is invalid to update a task that does not exist.
The timestamp on updates serves as additional metadata and is used to resolve conflicts.