From 8ce88faa78d9b300b60fc14379f02289e2b77554 Mon Sep 17 00:00:00 2001 From: shockrah Date: Tue, 3 Nov 2020 23:36:13 -0800 Subject: [PATCH] new filtertype parameter is being given for our .filter method --- server-api/db/src/common.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server-api/db/src/common.rs b/server-api/db/src/common.rs index f900e67..22669bd 100644 --- a/server-api/db/src/common.rs +++ b/server-api/db/src/common.rs @@ -35,7 +35,7 @@ macro_rules! sql_err_log { * */ #[async_trait] -pub trait FromDB { +pub trait FromDB { type Row; async fn get(p: &Pool, id: UBigInt) -> Response; @@ -43,4 +43,6 @@ pub trait FromDB { async fn update(p: &Pool, row: T) -> Response; async fn delete(p: &Pool, id: UBigInt) -> Response; + + async fn filter(p: &Pool, filter_val: FilterType) -> Response; }