MCPcopy Create free account
hub / github.com/chatmail/core / transaction

Method transaction

src/sql.rs:445–452  ·  view source on GitHub ↗

Execute the function inside a transaction assuming that it does writes. If the function returns an error, the transaction will be rolled back. If it does not return an error, the transaction will be committed.

(&self, callback: G)

Source from the content-addressed store, hash-verified

443 /// If the function returns an error, the transaction will be rolled back. If it does not return an
444 /// error, the transaction will be committed.
445 pub async fn transaction<G, H>(&self, callback: G) -> Result<H>
446 where
447 H: Send + 'static,
448 G: Send + FnOnce(&mut rusqlite::Transaction<'_>) -> Result<H>,
449 {
450 let query_only = false;
451 self.transaction_ex(query_only, callback).await
452 }
453
454 /// Execute the function inside a transaction.
455 ///

Callers 15

set_config_exMethod · 0.80
update_timestampMethod · 0.80
set_name_exMethod · 0.80
scaleup_originMethod · 0.80
add_or_lookup_exMethod · 0.80
deleteMethod · 0.80
send_mdn_rfc724_midFunction · 0.80
transaction_exMethod · 0.80
receive_imf_innerFunction · 0.80

Calls 1

transaction_exMethod · 0.80

Tested by 1

test_query_onlyFunction · 0.64