Skip to content

Release v3.21.0

Choose a tag to compare

@github-actions github-actions released this 09 Nov 21:58
c10a519

Summary

Projections can now keep the first value an event supplies, maintain dictionary entries keyed by a value from the event, and keep children newest first or sorted. These features require Chronicle 19.150.0 or later.

Added

  • set_once: sets a property or dictionary entry only while it has no value, so the first event wins.
  • Dictionary entries keyed by a value from the event: key sources {:event_content, field}, {:event_context, field} and {:caused_by, :subject | :name | :user_name}, with set, set once, add, subtract, count, increment, decrement and remove operations.
  • {:caused_by, :subject | :name | :user_name} maps a property from the identity that caused the event; a bare :caused_by still reads the event field of that name.
  • In-memory projection testing evaluates set once and dictionary entries the way the kernel does.
  • children takes prepend: true to insert new children first, or order_by: :field, [asc: :field] or [desc: :field] to insert them sorted, matching the .NET client's Prepend(), OrderBy() and OrderByDescending() (#216)