pub struct RowLock {
pub strength: LockStrength,
pub of_tables: Vec<String>,
pub wait: LockWait,
}Expand description
Row locking mode.
Fields§
§strength: LockStrengthLock strength.
of_tables: Vec<String>Tables to lock (optional).
wait: LockWaitWait behavior.
Implementations§
Source§impl RowLock
impl RowLock
Sourcepub fn for_update() -> RowLockBuilder
pub fn for_update() -> RowLockBuilder
Create FOR UPDATE lock.
Create FOR SHARE lock.
Sourcepub fn for_no_key_update() -> RowLockBuilder
pub fn for_no_key_update() -> RowLockBuilder
Create FOR NO KEY UPDATE lock.
Create FOR KEY SHARE lock.
Sourcepub fn to_postgres_sql(&self) -> String
pub fn to_postgres_sql(&self) -> String
Generate PostgreSQL FOR clause.
Sourcepub fn to_mysql_sql(&self) -> String
pub fn to_mysql_sql(&self) -> String
Generate MySQL FOR clause.
Sourcepub fn to_mssql_hint(&self) -> String
pub fn to_mssql_hint(&self) -> String
Generate MSSQL table hint.
Sourcepub fn to_sql(&self, db_type: DatabaseType) -> QueryResult<String>
pub fn to_sql(&self, db_type: DatabaseType) -> QueryResult<String>
Generate SQL for database type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RowLock
impl<'de> Deserialize<'de> for RowLock
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 RowLock
impl StructuralPartialEq for RowLock
Auto Trait Implementations§
impl Freeze for RowLock
impl RefUnwindSafe for RowLock
impl Send for RowLock
impl Sync for RowLock
impl Unpin for RowLock
impl UnwindSafe for RowLock
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