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.

In pins 10 + flow
  • flow
  • storage value required

    the storage the log's entries are documents of; it names the log

  • key value required

    the log within the storage: an order, an account, a channel

  • id value required

    the entry's id, unique within its key

  • set object

    fields to set

  • remove array

    field names to remove

  • touch condition

    move the changed sequence (true by default)

    Default true

  • key field value

    the field that holds the key; log_key by default

    Default log_key

  • id field value

    the field that holds the entry's id; id by default

    Default id

  • created field value

    the field that holds the created sequence; created_seq by default

    Default created_seq

  • changed field value

    the field that holds the changed sequence; changed_seq by default

    Default changed_seq

Out pins 6 + flow
  • 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