diff --git a/acrate-core/src/meta.rs b/acrate-core/src/meta.rs index bcfd200..ef66ab7 100644 --- a/acrate-core/src/meta.rs +++ b/acrate-core/src/meta.rs @@ -89,21 +89,25 @@ impl MetaLink { .load(conn) .await } - - pub async fn query_properties(&self, conn: &mut AsyncPgConnection) -> QueryResult> { +} + +impl MetaLinkProperty { + pub async fn query_by_link(conn: &mut AsyncPgConnection, links: &[MetaLink]) -> QueryResult> { use diesel::prelude::*; use diesel_async::RunQueryDsl; - MetaLinkProperty::belonging_to(self) + Self::belonging_to(links) .load(conn) .await } - - pub async fn query_titles(&self, conn: &mut AsyncPgConnection) -> QueryResult> { +} + +impl MetaLinkTitle { + pub async fn query_by_link(conn: &mut AsyncPgConnection, links: &[MetaLink]) -> QueryResult> { use diesel::prelude::*; use diesel_async::RunQueryDsl; - MetaLinkTitle::belonging_to(self) + Self::belonging_to(links) .load(conn) .await }