pub struct PostgresCheckpointStore { /* private fields */ }Expand description
Postgres-backed checkpoint store for tracking projection progress.
PostgresCheckpointStore stores checkpoint positions in a PostgreSQL table,
providing durability across process restarts. It implements the CheckpointStore
trait from eventcore-types.
§Schema
The store uses the eventcore_subscription_versions table with:
subscription_name: Unique identifier for each projector/subscriptionlast_position: UUID7 representing the global stream positionupdated_at: Timestamp of the last checkpoint update
Implementations§
Source§impl PostgresCheckpointStore
impl PostgresCheckpointStore
Sourcepub async fn new<S: Into<String>>(
connection_string: S,
) -> Result<Self, PostgresCheckpointError>
pub async fn new<S: Into<String>>( connection_string: S, ) -> Result<Self, PostgresCheckpointError>
Create a new PostgresCheckpointStore with default configuration.
Sourcepub async fn with_config<S: Into<String>>(
connection_string: S,
config: PostgresConfig,
) -> Result<Self, PostgresCheckpointError>
pub async fn with_config<S: Into<String>>( connection_string: S, config: PostgresConfig, ) -> Result<Self, PostgresCheckpointError>
Create a new PostgresCheckpointStore with custom configuration.
Trait Implementations§
Source§impl CheckpointStore for PostgresCheckpointStore
impl CheckpointStore for PostgresCheckpointStore
Source§impl Clone for PostgresCheckpointStore
impl Clone for PostgresCheckpointStore
Source§fn clone(&self) -> PostgresCheckpointStore
fn clone(&self) -> PostgresCheckpointStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PostgresCheckpointStore
impl !RefUnwindSafe for PostgresCheckpointStore
impl Send for PostgresCheckpointStore
impl Sync for PostgresCheckpointStore
impl Unpin for PostgresCheckpointStore
impl !UnwindSafe for PostgresCheckpointStore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more