WalEx.Helpers (WalEx v4.8.0)

Copy Markdown View Source

Internal formatting helpers used when building WalEx.Event structs.

Produces the type string (e.g. "user.insert") attached to each event and the source string ("WalEx/<version>") included on every event for downstream attribution.

Summary

Functions

Returns the source name component ("WalEx") used in event attribution.

Returns the running WalEx version as a string (from Application.spec/2).

Returns the source identifier ("WalEx/<version>") for outgoing events.

Returns the dotted "<table>.<change>" event type for a given change kind.

Functions

get_source_name()

Returns the source name component ("WalEx") used in event attribution.

get_source_version()

Returns the running WalEx version as a string (from Application.spec/2).

set_source()

Returns the source identifier ("WalEx/<version>") for outgoing events.

set_type(table, atom)

Returns the dotted "<table>.<change>" event type for a given change kind.

Examples

iex> WalEx.Helpers.set_type("user", :insert)
"user.insert"