pub enum Dialect {
Postgres,
MySql,
Sqlite,
}Expand description
SQL dialect differences absorbed by the backend stores.
A Dialect knows how to render the four statements the outbox needs
(poll, mark-delivered, mark-failed, insert) and the canonical schema DDL
for its engine, accounting for placeholder style, row locking, the
“current instant” expression and per-engine column types.
Variants§
Implementations§
Source§impl Dialect
impl Dialect
Sourcepub fn supports_skip_locked(self) -> bool
pub fn supports_skip_locked(self) -> bool
Whether competing-consumers row skip-locking is available.
true for PostgreSQL and MySQL 8.0+, false for SQLite (which
serializes writes through a single writer instead).
Sourcepub fn schema_ddl(self, table: &str) -> Result<String, OutboxError>
pub fn schema_ddl(self, table: &str) -> Result<String, OutboxError>
Canonical schema DDL (table + indexes) rendered for this dialect.
§Errors
Returns OutboxError::Internal if table is not a valid
identifier matching ^[a-zA-Z_][a-zA-Z0-9_]*$.
Trait Implementations§
impl Copy for Dialect
impl Eq for Dialect
impl StructuralPartialEq for Dialect
Auto Trait Implementations§
impl Freeze for Dialect
impl RefUnwindSafe for Dialect
impl Send for Dialect
impl Sync for Dialect
impl Unpin for Dialect
impl UnsafeUnpin for Dialect
impl UnwindSafe for Dialect
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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