pub struct LockingClause {
pub strength: LockStrength,
pub of: ThinVec<ObjectName>,
pub wait: Option<LockWait>,
pub spelling: LockingSpelling,
pub meta: Meta,
}Expand description
One row-locking clause on a Query: FOR UPDATE/FOR SHARE/… with the
optional OF <table>, … target list and a NOWAIT/SKIP LOCKED wait policy.
PostgreSQL and MySQL share this modern surface (PG for_locking_clause), so it
is one canonical shape gated per-dialect rather than a parallel node
per engine. MySQL’s legacy LOCK IN SHARE MODE is a spelling of FOR SHARE
(it predates the FOR SHARE keyword), folded onto this shape with a
LockingSpelling tag so the surface round-trips. Carries no Expr, so it is
not generic over the extension parameter.
Fields§
§strength: LockStrengthWhich lock strength (FOR UPDATE/FOR SHARE/…); see LockStrength.
of: ThinVec<ObjectName>The OF <table>, … restriction naming which relations the lock applies to;
empty when the clause locks every table in the query (no OF). PostgreSQL
maps these to RangeVars (relation names), so ObjectName, not Ident.
wait: Option<LockWait>Optional wait for this syntax.
spelling: LockingSpellingExact source spelling retained for faithful rendering.
meta: MetaSource location and node identity.
Trait Implementations§
Source§impl Clone for LockingClause
impl Clone for LockingClause
Source§fn clone(&self) -> LockingClause
fn clone(&self) -> LockingClause
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LockingClause
impl Debug for LockingClause
Source§impl<'de> Deserialize<'de> for LockingClause
impl<'de> Deserialize<'de> for LockingClause
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>,
impl Eq for LockingClause
Source§impl Hash for LockingClause
impl Hash for LockingClause
Source§impl PartialEq for LockingClause
impl PartialEq for LockingClause
Source§impl Render for LockingClause
impl Render for LockingClause
Source§fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
Source§fn operand_binding_power(&self) -> Option<BindingPower>
fn operand_binding_power(&self) -> Option<BindingPower>
None (the default) for a self-delimiting node — an atom, call, or
constructor — that never needs parentheses. Read moreSource§impl Serialize for LockingClause
impl Serialize for LockingClause
impl StructuralPartialEq for LockingClause
Auto Trait Implementations§
impl Freeze for LockingClause
impl RefUnwindSafe for LockingClause
impl Send for LockingClause
impl Sync for LockingClause
impl Unpin for LockingClause
impl UnsafeUnpin for LockingClause
impl UnwindSafe for LockingClause
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DynAstExt for T
impl<T> DynAstExt for T
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&dyn Any for downcasting a node back to its concrete type.Source§fn dyn_clone(&self) -> Box<dyn DynAstExt>
fn dyn_clone(&self) -> Box<dyn DynAstExt>
Clone (whose
Self-returning signature cannot go through a vtable).Source§fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
PartialEq (whose &Self argument cannot go through a vtable). Equal
iff other holds the same concrete type and that type deems the values
equal; differently-typed nodes are never equal.