pub enum IsolationLevel {
RepeatableRead,
Snapshot,
ReadCommitted,
Serializable,
}Expand description
Transaction isolation level (spec §10.2, S1B-002). MongrelDB defaults to
RepeatableRead (snapshot isolation).
RepeatableRead: one snapshot fixed atbegin; own staged writes are visible to the transaction; write/write conflicts abort one transaction (first-committer-wins). This is the engine’s historicalSnapshot(SI) semantics under its SQL-standard name.Snapshot: deprecated alias ofRepeatableRead, kept so existing call sites compile unchanged. The two are interchangeable everywhere viaSelf::canonical.ReadCommitted: each statement obtains a new snapshot at the latest visible epoch, so committed concurrent changes may appear between statements. Commit-time conflict validation still uses the begin epoch (conservative first-committer-wins).Serializable: repeatable-read snapshot plus SSI-style certification — the commit sequencer tracks read dependencies (point reads), predicate/ range reads (table granularity), and write dependencies, and aborts with a serialization failure when a concurrent commit invalidated a tracked read (the rw-antidependency dangerous structure).
Variants§
RepeatableRead
Snapshot
👎Deprecated:
renamed to RepeatableRead (spec §10.2 S1B-002); identical semantics, kept for compatibility
ReadCommitted
Serializable
Implementations§
Trait Implementations§
Source§impl Clone for IsolationLevel
impl Clone for IsolationLevel
Source§fn clone(&self) -> IsolationLevel
fn clone(&self) -> IsolationLevel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for IsolationLevel
Source§impl Debug for IsolationLevel
impl Debug for IsolationLevel
Source§impl Default for IsolationLevel
impl Default for IsolationLevel
Source§fn default() -> IsolationLevel
fn default() -> IsolationLevel
Returns the “default value” for a type. Read more
impl Eq for IsolationLevel
Source§impl PartialEq for IsolationLevel
impl PartialEq for IsolationLevel
impl StructuralPartialEq for IsolationLevel
Auto Trait Implementations§
impl Freeze for IsolationLevel
impl RefUnwindSafe for IsolationLevel
impl Send for IsolationLevel
impl Sync for IsolationLevel
impl Unpin for IsolationLevel
impl UnsafeUnpin for IsolationLevel
impl UnwindSafe for IsolationLevel
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> 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