summaryrefslogtreecommitdiff
path: root/src/login/repo
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-09-13 21:19:40 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-09-13 23:12:31 -0400
commit388a3d5a925aef7ff39339454ae0d720e05f038e (patch)
tree672595cd179eeca7c9e61606704e453202f9efb0 /src/login/repo
parent72daa3f510ea381b7e3606c75f03ce6000dc780c (diff)
Generate the required structure for broadcasting from a join, not from O(n) queries.
Diffstat (limited to 'src/login/repo')
-rw-r--r--src/login/repo/logins.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/login/repo/logins.rs b/src/login/repo/logins.rs
index e1c5057..b0c8ce4 100644
--- a/src/login/repo/logins.rs
+++ b/src/login/repo/logins.rs
@@ -107,6 +107,12 @@ impl<'c> Logins<'c> {
}
}
+impl<'t> From<&'t mut SqliteConnection> for Logins<'t> {
+ fn from(tx: &'t mut SqliteConnection) -> Self {
+ Self(tx)
+ }
+}
+
/// Stable identifier for a [Login]. Prefixed with `L`.
#[derive(Clone, Debug, Eq, PartialEq, sqlx::Type, serde::Serialize)]
#[sqlx(transparent)]