API Reference Phoenix.Sync v0.5.1

View Source

Modules

Real-time sync for Postgres-backed Phoenix applications.

Low level Elixir client. Converts an Ecto.Query into an Elixir Stream

Provides controller-level integration with sync streams.

A Plug.Router and Phoenix.Router compatible Plug handler that allows you to mount the full Electric shape api into your application.

Swap out Phoenix.LiveView.stream/3 for Phoenix.Sync.LiveView.sync_stream/4 to automatically keep a LiveView up-to-date with the state of your Postgres database

A Plug that adds the necessary CORS headers to responses from Electric sync endpoints.

Provides router macros to simplify the exposing of Electric shape streams within your Phoenix or Plug application.

Integration between Ecto.Adapters.SQL.Sandbox and Electric that produces replication events from Ecto operations within a sandboxed connection.

Materialize a shape stream into memory and subscribe to changes.

Provides write-path sync support for Phoenix- or Plug-based apps.

Provides context within callback functions.

Defines a behaviour that applications can implement in order to handle custom data formats within a Phoenix.Sync.Writer

Implements the Phoenix.Sync.Writer.Format behaviour for the data format used by TanStack/db.

Represents a mutation operation received from a client.

Represents a transaction containing a list of Phoenix.Sync.Writer.Operations that should be applied atomically.