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; }