Electric.Postgres.Configuration (electric v1.2.4)
View SourceModule for functions that configure Postgres in some way using a provided connection.
Summary
Functions
Check whether the publication with the given name exists, and return its status.
Types
@type relation_actions() :: %{ to_preserve: relation_filters(), to_add: relation_filters(), to_drop: relation_filters(), to_configure_replica_identity: relation_filters(), to_invalidate: relation_filters() }
@type relation_filters() :: Electric.Replication.PublicationManager.RelationTracker.relation_filters()
Functions
@spec add_table_to_publication( Postgrex.conn(), String.t(), Electric.oid_relation(), timeout() ) :: :ok | {:error, term()}
@spec check_publication_status!(Postgrex.conn(), String.t()) :: publication_status() | :not_found
Check whether the publication with the given name exists, and return its status.
The status includes whether the publication is owned, whether it publishes all operations, and whether it publishes generated columns (if supported by the Postgres version).
@spec configure_table_for_replication( Postgrex.conn(), String.t(), Electric.oid_relation(), timeout() ) :: :ok | {:error, term()}
@spec determine_publication_relation_actions!( Postgrex.conn(), String.t(), relation_filters() ) :: relation_actions()
@spec drop_table_from_publication( Postgrex.conn(), String.t(), Electric.oid_relation(), timeout() ) :: :ok | {:error, term()}
@spec get_publication_tables!(Postgrex.conn(), String.t()) :: [ relation_with_replica() ]
@spec set_table_replica_identity_full( Postgrex.conn(), Electric.oid_relation(), timeout() ) :: :ok | {:error, term()}