LiveSync.Watch protocol (live_sync v0.1.2)
Protocol for defining which Ecto schemas to watch for changes.
Two options are supported:
- subscription_key (required): The field on the schema that is used to filter messages that a LiveView session is subscribed to
- table (optional): The table to watch, defaults to the schema's table name, if using a view you need to specify the table name
Example:
@derive {LiveSync.Watch,
[
subscription_key: :organization_id,
table: "table"
]}
Summary
Types
@type t() :: term()
All the types that implement this protocol.