new filtertype parameter is being given for our .filter method

This commit is contained in:
shockrah 2020-11-03 23:36:13 -08:00
parent f9bc6b3dc9
commit 8ce88faa78

View File

@ -35,7 +35,7 @@ macro_rules! sql_err_log {
* */
#[async_trait]
pub trait FromDB<T> {
pub trait FromDB<T, FilterType> {
type Row;
async fn get(p: &Pool, id: UBigInt) -> Response<T>;
@ -43,4 +43,6 @@ pub trait FromDB<T> {
async fn update(p: &Pool, row: T) -> Response<T>;
async fn delete(p: &Pool, id: UBigInt) -> Response<T>;
async fn filter(p: &Pool, filter_val: FilterType) -> Response<T>;
}