What Decree.Store.read_query/2 answers, all of it from one database snapshot.
Fields
events- the matchingDecree.Store.RecordedEvents, in the read's direction.event_numberis the event's$allposition, andstream_uuidandstream_versionare its original stream's, exactly as a row ofDecree.Store.read_all_streams_forward/3. A match only the read'sposition_itemsmatched has no event here, only its entries in the maps below.after- the$allhead at the read's snapshot. It is not the last match: an event that does not match still moves it.read_at- aDateTime, the database's clock when the read ran, taken once.command_stamps-%{position => stamp}for each match carrying the read'scommand_tag. A match without that tag has no entry. Anilstamp means the tag's row carries no stamp, which is not the same as having no row.matched_items-%{position => indexes}, the sorted 0-based indexes of the items that matched each match, the onesposition_itemsanswers with no event included.tags-%{position => tags}for each match one of the read'stag_itemsmatched, its tags sorted bytewise, from the same snapshot as the rest. It leaves out whatDecree.Store.read_tags/2leaves out, so a position with no tag left, or one notag_itemsitem matched, has no entry.%{}when the read names notag_items.
Summary
Types
@type position() :: non_neg_integer()
@type t() :: %Decree.Store.ReadResult{ after: non_neg_integer(), command_stamps: %{required(position()) => DateTime.t() | nil}, events: [Decree.Store.RecordedEvent.t()], matched_items: %{required(position()) => [non_neg_integer()]}, read_at: DateTime.t(), tags: %{required(position()) => [String.t()]} }