update log entry
This block is part of the data group and was last modified in core v15.0.2.
update log entry v15.0.2 Changes an entry of an ordered log: set fields, remove fields; touch moves its changed sequence so catch-up carries it. An order event's note, an audit record's review, a message's edit.
- flow
- storage
valuerequiredthe storage the log's entries are documents of; it names the log
- key
valuerequiredthe log within the storage: an order, an account, a channel
- id
valuerequiredthe entry's id, unique within its key
- set
objectfields to set
- remove
arrayfield names to remove
- touch
conditionmove the changed sequence (true by default)
- key field
valuethe field that holds the key; log_key by default
- id field
valuethe field that holds the entry's id; id by default
- created field
valuethe field that holds the created sequence; created_seq by default
- changed field
valuethe field that holds the changed sequence; changed_seq by default
- flow
- success
condition - found
condition - entry
object - guid
value - seq
number - error
value
Sets and removes fields through the storage; the key, id, created and changed fields and _meta are the log's and are skipped. touch (true by default) moves the changed sequence to the key's next one, which is what puts the change in a log_since catch-up; a change nobody needs to sync (a view counter, a chat reaction) sets touch false and only refreshes the cache, and seq is then 0. found is false when no entry of the key has the id. The four *_field pins must name the fields the entries were appended with. A sequence is a millisecond stamp from the key's own clock, max(now ms, the key's last + 1), so it is strictly increasing per key in commit order and compares with a cursor (cursor_set, cursor_lag).
Version history
Introduced in v15.0.2.
v15.0.2: block added in this release.
Back to
data Return to the main group to view all sub-groups Back to ordered log Return to the group to view all blocks within this group