### start_link(config) Source: https://hexdocs.pm/cainophile/Cainophile.Adapters.Postgres.html Starts the Postgres adapter process. ```APIDOC ## start_link(config) ### Description Starts the Postgres adapter process. ### Parameters #### Path Parameters - **config** (keyword list) - Required - The configuration for the adapter. ``` -------------------------------- ### child_spec(init_arg) Source: https://hexdocs.pm/cainophile/Cainophile.Adapters.Postgres.html Returns a specification to start this module under a supervisor. See `Supervisor`. ```APIDOC ## child_spec(init_arg) ### Description Returns a specification to start this module under a supervisor. See `Supervisor`. ### Parameters #### Path Parameters - **init_arg** (any) - Required - The initial argument for the supervisor specification. ``` -------------------------------- ### init Source: https://hexdocs.pm/cainophile/Cainophile.Adapters.Postgres.AdapterBehaviour.html Initializes the adapter with the provided configuration. It returns the initial state of the adapter or a stop reason. ```APIDOC ## init(config) ### Description Initializes the adapter with the provided configuration. It returns the initial state of the adapter or a stop reason. ### Parameters #### Path Parameters - **config** (term()) - The configuration term for the adapter. ### Returns - **{:ok, %Cainophile.Adapters.Postgres.State{...}}** - On successful initialization, returns the adapter's state. - **{:stop, reason :: binary()}** - On failure, returns a stop reason. ``` -------------------------------- ### Initialize Adapter Callback Signature Source: https://hexdocs.pm/cainophile/Cainophile.Adapters.Postgres.AdapterBehaviour.html Signature for the init callback, used to initialize the adapter with configuration. It returns either {:ok, state} or {:stop, reason}. ```Elixir init(config :: term()) :: {:ok, %Cainophile.Adapters.Postgres.State{ config: term(), connection: term(), relations: term(), subscribers: term(), transaction: term(), types: term() }} | {:stop, reason :: binary()} ``` -------------------------------- ### subscribe(pid, receiver_pid) Source: https://hexdocs.pm/cainophile/Cainophile.Adapters.Postgres.html Subscribes a receiver process to receive notifications from the adapter. ```APIDOC ## subscribe(pid, receiver_pid) ### Description Subscribes a receiver process to receive notifications from the adapter. ### Parameters #### Path Parameters - **pid** (pid) - Required - The PID of the adapter process. - **receiver_pid** (pid) - Required - The PID of the process to subscribe. ``` -------------------------------- ### Acknowledge LSN Callback Signature Source: https://hexdocs.pm/cainophile/Cainophile.Adapters.Postgres.AdapterBehaviour.html Signature for the acknowledge_lsn callback, used to acknowledge the last processed LSN (Log Sequence Number). ```Elixir acknowledge_lsn(connection :: pid(), {xlog :: integer(), offset :: integer()}) :: :ok ``` -------------------------------- ### acknowledge_lsn Source: https://hexdocs.pm/cainophile/Cainophile.Adapters.Postgres.AdapterBehaviour.html Acknowledges the last processed LSN (Log Sequence Number) to the connection. This is typically used for replication tracking. ```APIDOC ## acknowledge_lsn(connection, {xlog, offset}) ### Description Acknowledges the last processed LSN (Log Sequence Number) to the connection. This is typically used for replication tracking. ### Parameters #### Path Parameters - **connection** (pid()) - The connection process identifier. - **xlog** (integer()) - The XLOG position to acknowledge. - **offset** (integer()) - The offset within the XLOG position to acknowledge. ### Returns - **:ok** - Indicates successful acknowledgment. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.