(context: &Context, namespace: Namespace, token: &str)
| 82 | } |
| 83 | |
| 84 | pub 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 | /// |
no test coverage detected