pub struct PgSink { /* private fields */ }Implementations§
Source§impl PgSink
impl PgSink
Sourcepub async fn new(client: PgClient, limits: SinkLimits) -> Result<Self>
pub async fn new(client: PgClient, limits: SinkLimits) -> Result<Self>
Prepare a connected target client: create the metadata schema and configure the session for replica apply.
Sourcepub fn restrict_to(self, tables: &[TableName]) -> Self
pub fn restrict_to(self, tables: &[TableName]) -> Self
Restrict apply to the configured tables (run path). Without this, every
published relation that exists on the target is accepted (status/cleanup never
apply anything, so they do not need it).
pub fn client(&self) -> &PgClient
Trait Implementations§
Source§impl ReplicationSink for PgSink
impl ReplicationSink for PgSink
Source§async fn load_checkpoint(&mut self, job_id: &str) -> Result<Option<Checkpoint>>
async fn load_checkpoint(&mut self, job_id: &str) -> Result<Option<Checkpoint>>
Load the job’s checkpoint;
None if the job has never been bootstrapped.Source§async fn save_checkpoint(&mut self, cp: &Checkpoint) -> Result<()>
async fn save_checkpoint(&mut self, cp: &Checkpoint) -> Result<()>
Persist a checkpoint outside of any data transaction (autocommit).
Source§async fn relation(&mut self, rel: Arc<Relation>) -> Result<()>
async fn relation(&mut self, rel: Arc<Relation>) -> Result<()>
Relation metadata; may arrive inside or outside a transaction and must be cached.
Source§async fn apply(&mut self, op: Op) -> Result<()>
async fn apply(&mut self, op: Op) -> Result<()>
Apply one change inside the open transaction. Implementations may batch.
Auto Trait Implementations§
impl !RefUnwindSafe for PgSink
impl !UnwindSafe for PgSink
impl Freeze for PgSink
impl Send for PgSink
impl Sync for PgSink
impl Unpin for PgSink
impl UnsafeUnpin for PgSink
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more