pub enum LockStrength {
Update,
NoKeyUpdate,
Share,
KeyShare,
}Expand description
The strength of a LockingClause, strongest first as PostgreSQL orders them.
All four PostgreSQL for_locking_strength levels are modelled so the one shape
covers both dialects (MySQL writes only Update and
Share; the KEY/NO KEY refinements are PostgreSQL-only).
Variants§
Update
FOR UPDATE — the strongest row lock.
NoKeyUpdate
FOR NO KEY UPDATE — a weaker exclusive lock that still admits KEY SHARE (PostgreSQL).
FOR SHARE (also MySQL’s LOCK IN SHARE MODE, distinguished by
LockingSpelling).
FOR KEY SHARE — the weakest row lock (PostgreSQL).
Trait Implementations§
Source§impl Clone for LockStrength
impl Clone for LockStrength
Source§fn clone(&self) -> LockStrength
fn clone(&self) -> LockStrength
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 LockStrength
Source§impl Debug for LockStrength
impl Debug for LockStrength
Source§impl<'de> Deserialize<'de> for LockStrength
impl<'de> Deserialize<'de> for LockStrength
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LockStrength
Source§impl Hash for LockStrength
impl Hash for LockStrength
Source§impl PartialEq for LockStrength
impl PartialEq for LockStrength
Source§impl Serialize for LockStrength
impl Serialize for LockStrength
impl StructuralPartialEq for LockStrength
Auto Trait Implementations§
impl Freeze for LockStrength
impl RefUnwindSafe for LockStrength
impl Send for LockStrength
impl Sync for LockStrength
impl Unpin for LockStrength
impl UnsafeUnpin for LockStrength
impl UnwindSafe for LockStrength
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