From c811926478914de99cbd907a989056864351c816 Mon Sep 17 00:00:00 2001 From: Joshua Sangmeister Date: Fri, 13 Nov 2020 13:04:20 +0100 Subject: [PATCH] Update datastore specs --- docs/interfaces/datastore-service.txt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/interfaces/datastore-service.txt b/docs/interfaces/datastore-service.txt index 582243e6f..acca052c7 100644 --- a/docs/interfaces/datastore-service.txt +++ b/docs/interfaces/datastore-service.txt @@ -84,14 +84,28 @@ Interface CreateEvent { } } -// Note: For deleting keys, they must be set to `None`. These keys -// will be removed from the model. +// Note: For deleting keys, they must be set to `None`. These keys will be removed from +// the model. +// list_fields can be used to partially update list fields: the values in `add` will be +// appended to the given field, the values in `remove` will be removed from the field. +// The case of double adding or removing something invalid will be silently ignored. +// All given list_fields must be flat arrays of strings or ints, else an error is +// thrown. +// Either fields or list_fields must be given or an error will be thrown. Interface UpdateEvent { type: 'update'; fqid: Fqid; fields: { : Value; } + list_fields: { + add: { + : Value[]; + } + remove: { + : Value[]; + } + } } Interface RestoreEvent {