pub struct NotificationOperator { /* private fields */ }Expand description
Explicit schema administration for one Notification Plugin Instance.
Implementations§
Source§impl NotificationOperator
impl NotificationOperator
pub async fn setup( database_url: &str, ) -> Result<SetupOutcome, NotificationOperatorError>
pub async fn upgrade( database_url: &str, ) -> Result<UpgradeOutcome, NotificationOperatorError>
Sourcepub async fn adopt_legacy(
database_url: &str,
) -> Result<LegacyAdoptionOutcome, NotificationOperatorError>
pub async fn adopt_legacy( database_url: &str, ) -> Result<LegacyAdoptionOutcome, NotificationOperatorError>
One-time, fail-closed adoption of the exact pre-Plugin Notification
schema. This records migration 1 without rewriting any ledger rows or
replaying the immutable legacy SQL against the owned schema. Adoption
is a mandatory maintenance-window operation: all Notification writers
and DDL actors must be stopped. It locks the shared legacy ledger in
share mode and all legacy Notification tables in access-exclusive mode
until the catalog proof and Plugin migration record commit. The advisory
shared maintenance advisory lock coordinates cooperating schema
operators, followed by the Notification-specific advisory lock.
PostgreSQL has no schema namespace lock here, so these locks do not make
arbitrary concurrent CREATE statements atomic with adoption.
pub async fn connect( database_url: &str, ) -> Result<Self, NotificationOperatorError>
pub fn schema(&self) -> &str
Trait Implementations§
Source§impl Clone for NotificationOperator
impl Clone for NotificationOperator
Source§fn clone(&self) -> NotificationOperator
fn clone(&self) -> NotificationOperator
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for NotificationOperator
impl !UnwindSafe for NotificationOperator
impl Freeze for NotificationOperator
impl Send for NotificationOperator
impl Sync for NotificationOperator
impl Unpin for NotificationOperator
impl UnsafeUnpin for NotificationOperator
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
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> ⓘ
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> ⓘ
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