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

Method execute

src/sql.rs:328–338  ·  view source on GitHub ↗

Execute `query` assuming it is a write query, returning the number of affected rows.

(
        &self,
        query: &str,
        params: impl rusqlite::Params + Send,
    )

Source from the content-addressed store, hash-verified

326
327 /// Execute `query` assuming it is a write query, returning the number of affected rows.
328 pub async fn execute(
329 &self,
330 query: &str,
331 params: impl rusqlite::Params + Send,
332 ) -> Result<usize> {
333 self.call_write(move |conn| {
334 let res = conn.execute(query, params)?;
335 Ok(res)
336 })
337 .await
338 }
339
340 /// Executes the given query, returning the last inserted row ID.
341 pub async fn insert(&self, query: &str, params: impl rusqlite::Params + Send) -> Result<i64> {

Callers 15

reset_tablesFunction · 0.80
download_fullMethod · 0.80
update_download_stateMethod · 0.80
delete_from_downloadsFunction · 0.80
set_config_exMethod · 0.80
update_timestampMethod · 0.80
set_name_exMethod · 0.80
mark_botMethod · 0.80
regossip_keysMethod · 0.80

Calls 1

call_writeMethod · 0.80

Tested by 15

test_load_brokenFunction · 0.64
change_addrMethod · 0.64
buildMethod · 0.64
pop_sent_msg_exMethod · 0.64
get_smtp_rows_for_msgMethod · 0.64
set_chat_protectedMethod · 0.64
test_build_sync_jsonFunction · 0.64
test_db_reopenFunction · 0.64