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

Method query_get_value

src/sql.rs:551–561  ·  view source on GitHub ↗

Executes a query which is expected to return one row and one column. If the query does not return any rows, returns `Ok(None)`.

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

Source from the content-addressed store, hash-verified

549 /// Executes a query which is expected to return one row and one
550 /// column. If the query does not return any rows, returns `Ok(None)`.
551 pub async fn query_get_value<T>(
552 &self,
553 query: &str,
554 params: impl rusqlite::Params + Send,
555 ) -> Result<Option<T>>
556 where
557 T: rusqlite::types::FromSql + Send + 'static,
558 {
559 self.query_row_optional(query, params, |row| row.get::<_, T>(0))
560 .await
561 }
562
563 /// Set private configuration options.
564 ///

Callers 15

get_storage_usageFunction · 0.80
lookup_id_by_addr_exMethod · 0.80
get_verifier_idMethod · 0.80
from_msgMethod · 0.80
renderMethod · 0.80
render_messageMethod · 0.80
get_raw_configMethod · 0.80
get_draft_msg_idMethod · 0.80
created_timestampMethod · 0.80
join_timestampMethod · 0.80
get_timestampMethod · 0.80
get_paramMethod · 0.80

Calls 1

query_row_optionalMethod · 0.80

Tested by 7

dropMethod · 0.64
test_db_reopenFunction · 0.64
get_highest_msg_idFunction · 0.64
check_msg_is_deletedFunction · 0.64