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

Method insert

src/sql.rs:341–347  ·  view source on GitHub ↗

Executes the given query, returning the last inserted row ID.

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

Source from the content-addressed store, hash-verified

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> {
342 self.call_write(move |conn| {
343 conn.execute(query, params)?;
344 Ok(conn.last_insert_rowid())
345 })
346 .await
347 }
348
349 /// Prepares and executes the statement and maps a function over the resulting rows.
350 /// Then executes the second function over the returned iterator and returns the

Callers 15

run_bot_processMethod · 0.80
batch_get_configMethod · 0.80
get_messagesMethod · 0.80
get_contacts_by_idsMethod · 0.80
misc_get_stickersMethod · 0.80
fetch_single_msgMethod · 0.80
from_msgMethod · 0.80
renderMethod · 0.80
set_raw_configMethod · 0.80
get_raw_configMethod · 0.80

Calls 2

call_writeMethod · 0.80
executeMethod · 0.80

Tested by 5

run_bot_processMethod · 0.64
test_quota_needs_updateFunction · 0.64
buildMethod · 0.64
new_internalMethod · 0.64
test_setup_contact_exFunction · 0.64