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

Function exists

src/token.rs:84–93  ·  view source on GitHub ↗
(context: &Context, namespace: Namespace, token: &str)

Source from the content-addressed store, hash-verified

82}
83
84pub async fn exists(context: &Context, namespace: Namespace, token: &str) -> Result<bool> {
85 let exists = context
86 .sql
87 .exists(
88 "SELECT COUNT(*) FROM tokens WHERE namespc=? AND token=?;",
89 (namespace, token),
90 )
91 .await?;
92 Ok(exists)
93}
94
95/// Resets all tokens corresponding to the `foreign_key`.
96///

Callers 2

decode_openpgpFunction · 0.85

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected