pub enum IsolationLevel {
ReadUncommitted,
ReadCommitted,
RepeatableRead,
Serializable,
Snapshot,
}Expand description
Transaction isolation level.
SQL Server supports these isolation levels for transaction management.
Variants§
ReadUncommitted
Read uncommitted (dirty reads allowed).
Lowest isolation - transactions can read uncommitted changes from other transactions. Offers best performance but no consistency guarantees.
ReadCommitted
Read committed (default for SQL Server).
Transactions can only read committed data. Prevents dirty reads but allows non-repeatable reads and phantom reads.
RepeatableRead
Repeatable read.
Ensures rows read by a transaction don’t change during the transaction. Prevents dirty reads and non-repeatable reads, but allows phantom reads.
Serializable
Serializable (highest isolation).
Strictest isolation - transactions are completely isolated from each other. Prevents all read phenomena but has highest lock contention.
Snapshot
Snapshot isolation.
Uses row versioning to provide a point-in-time view of data. Requires snapshot isolation to be enabled on the database.
Implementations§
Trait Implementations§
Source§impl Clone for IsolationLevel
impl Clone for IsolationLevel
Source§fn clone(&self) -> IsolationLevel
fn clone(&self) -> IsolationLevel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IsolationLevel
impl Debug for IsolationLevel
Source§impl Default for IsolationLevel
impl Default for IsolationLevel
Source§fn default() -> IsolationLevel
fn default() -> IsolationLevel
Source§impl PartialEq for IsolationLevel
impl PartialEq for IsolationLevel
impl Copy for IsolationLevel
impl Eq 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 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
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
key and return true if they are equal.