# WalEx v4.8.0 - Table of Contents

> Listen to change events on your Postgres tables then perform callback-like actions with the data.

## Modules

- [WalEx](WalEx.md): Documentation for `WalEx`.

- [WalEx.Casting.ArrayParser](WalEx.Casting.ArrayParser.md): Parser for PostgreSQL array literals
- [WalEx.Casting.Types](WalEx.Casting.Types.md): Cast from Postgres to Elixir types
- [WalEx.Changes](WalEx.Changes.md): Internal change records produced after a logical replication transaction
has been decoded and grouped by `WalEx.Replication.Publisher`.
- [WalEx.Changes.DeletedRecord](WalEx.Changes.DeletedRecord.md): A row deleted within a transaction; `old_record` contains the previous values when available.
- [WalEx.Changes.NewRecord](WalEx.Changes.NewRecord.md): A row inserted within a transaction.
- [WalEx.Changes.Transaction](WalEx.Changes.Transaction.md): Decoded transaction: an ordered list of row changes plus commit timestamp.
- [WalEx.Changes.TruncatedRelation](WalEx.Changes.TruncatedRelation.md): A `TRUNCATE` of one of the subscribed tables.
- [WalEx.Changes.UpdatedRecord](WalEx.Changes.UpdatedRecord.md): A row updated within a transaction; includes the previous values when `REPLICA IDENTITY FULL` is set.
- [WalEx.Config](WalEx.Config.md): Per-app configuration store backed by `Agent`.
- [WalEx.Config.Registry](WalEx.Config.Registry.md): Shared `Registry` used to look up per-app WalEx processes
(config agent, GenServers, supervisors) by `{module, app_name}`.
- [WalEx.Decoder](WalEx.Decoder.md): Binary decoder for the Postgres logical replication `pgoutput` plugin.
- [WalEx.Decoder.Messages](WalEx.Decoder.Messages.md): Decoded representations of each `pgoutput` replication message.
- [WalEx.Decoder.Messages.Begin](WalEx.Decoder.Messages.Begin.md): `B` — start of a transaction; carries the final LSN, commit timestamp, and xid.
- [WalEx.Decoder.Messages.Commit](WalEx.Decoder.Messages.Commit.md): `C` — end of a transaction; carries the commit LSN and timestamp.
- [WalEx.Decoder.Messages.Delete](WalEx.Decoder.Messages.Delete.md): `D` — a row delete; carries either the key or the full old tuple, depending on `REPLICA IDENTITY`.
- [WalEx.Decoder.Messages.Insert](WalEx.Decoder.Messages.Insert.md): `I` — a row insert; `tuple_data` holds the new values.
- [WalEx.Decoder.Messages.Origin](WalEx.Decoder.Messages.Origin.md): `O` — origin marker emitted when a transaction has a logical replication origin.
- [WalEx.Decoder.Messages.Relation](WalEx.Decoder.Messages.Relation.md): `R` — relation (table) metadata: identifier, schema, name, replica identity, columns.
- [WalEx.Decoder.Messages.Relation.Column](WalEx.Decoder.Messages.Relation.Column.md): Per-column metadata within a `Relation` message.
- [WalEx.Decoder.Messages.Truncate](WalEx.Decoder.Messages.Truncate.md): `T` — a `TRUNCATE` of one or more relations; options indicate `CASCADE` / `RESTART IDENTITY`.
- [WalEx.Decoder.Messages.Type](WalEx.Decoder.Messages.Type.md): `Y` — a type registration for a non-built-in OID.
- [WalEx.Decoder.Messages.Unsupported](WalEx.Decoder.Messages.Unsupported.md): Catch-all for replication messages WalEx does not yet decode; carries the raw binary.
- [WalEx.Decoder.Messages.Update](WalEx.Decoder.Messages.Update.md): `U` — a row update; carries new values and, if available, the key or old tuple.
- [WalEx.Event](WalEx.Event.md): User-facing change event struct.
- [WalEx.Event.Dsl](WalEx.Event.Dsl.md): Macros that build the `process_all/process_insert/process_update/process_delete`
callbacks invoked by `WalEx.Events.EventModules` for each subscribed table.
- [WalEx.Event.Source](WalEx.Event.Source.md): Attribution metadata attached to every `WalEx.Event`.
- [WalEx.Events](WalEx.Events.md): Process events

- [WalEx.Events.EventModules](WalEx.Events.EventModules.md): Process events (call modules containing process functions)

- [WalEx.Events.Supervisor](WalEx.Events.Supervisor.md): Supervises the per-app event GenServers (`WalEx.Events` and, when configured,
`WalEx.Events.EventModules`). The latter is only started when the app's
`:modules` config is non-empty.

- [WalEx.Helpers](WalEx.Helpers.md): Internal formatting helpers used when building `WalEx.Event` structs.
- [WalEx.OidDatabase](WalEx.OidDatabase.md): Maps a numeric PostgreSQL type ID to a descriptive string.
- [WalEx.Replication.Publisher](WalEx.Replication.Publisher.md): GenServer that accumulates decoded `pgoutput` messages into transactions and
hands the resulting `WalEx.Changes.Transaction` off to `WalEx.Events`.
- [WalEx.Replication.Publisher.State](WalEx.Replication.Publisher.State.md): Publisher state: open transaction plus accumulated relation and type tables.
- [WalEx.Replication.QueryBuilder](WalEx.Replication.QueryBuilder.md): SQL and replication command strings used by `WalEx.Replication.Server` to
verify publication state and start logical decoding over the `pgoutput` plugin.
- [WalEx.Replication.Server](WalEx.Replication.Server.md): This module is responsible for setting up the replication connection

- [WalEx.Replication.Supervisor](WalEx.Replication.Supervisor.md): Supervises the per-app replication pipeline (`WalEx.Replication.Publisher`
and `WalEx.Replication.Server`).
- [WalEx.TransactionFilter](WalEx.TransactionFilter.md): Filter transactions based on the relation and event type.

- [WalEx.TransactionFilter.Filter](WalEx.TransactionFilter.Filter.md): Parsed relation filter: schema, table, and an optional condition.

## Mix Tasks

- [mix walex.drop](Mix.Tasks.Walex.Drop.md): Drops the database

- [mix walex.helpers](Mix.Tasks.Walex.Helpers.md): Shared helpers for the `walex.setup` and `walex.drop` Mix tasks.
- [mix walex.setup](Mix.Tasks.Walex.Setup.md): Creates, migrates and seeds the database

