pub struct CommitSql<'a> { /* private fields */ }Expand description
App SQL inside the app’s before-commit function: it reads any table app
SQL reads, the transaction’s changes included, and writes device-local
tables only. A statement that would write a synced table, itself or
through a trigger or foreign-key action, fails with
SyncedTableBeforeCommit. Returning an error rolls back the transaction
the function runs in.
Implementations§
Source§impl CommitSql<'_>
impl CommitSql<'_>
Sourcepub fn execute<P: Params>(&self, sql: &str, params: P) -> Result<usize>
pub fn execute<P: Params>(&self, sql: &str, params: P) -> Result<usize>
Execute one app statement with parameters.
Sourcepub fn execute_batch(&self, sql: &str) -> Result<()>
pub fn execute_batch(&self, sql: &str) -> Result<()>
Execute app statements within the transaction.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Freeze for CommitSql<'a>
impl<'a> !RefUnwindSafe for CommitSql<'a>
impl<'a> !Send for CommitSql<'a>
impl<'a> !Sync for CommitSql<'a>
impl<'a> !UnwindSafe for CommitSql<'a>
impl<'a> Unpin for CommitSql<'a>
impl<'a> UnsafeUnpin for CommitSql<'a>
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