pub fn find_lists_for_user(user_id: i32, conn: &PgConnection) -> Option<Vec<List>> {
        let possible_lists = lists::table
            .inner_join(user_lists::table.on(lists::list_id.eq(user_lists::list_id)))
            .into_boxed()
            .select((lists::list_id, lists::name, lists::description, lists::date_created))
            .filter(user_lists::user_id.eq(user_id))
            .load::<List>(conn);

        match possible_lists {
            Ok(result_lists) => Some(result_lists),
            Err(_) => None,
        }
    }
/// Finds the `List` rows that the given user can access.
Finds the `List` rows that the given user can access.
Finds the ` List ` rows that the given user can access .
pub fn find_lists_for_user(user_id: i32, conn: &PgConnection) -> Option<Vec<List>> {
        let possible_lists = lists::table
            .inner_join(user_lists::table.on(lists::list_id.eq(user_lists::list_id)))
            .into_boxed()
            .select((lists::list_id, lists::name, lists::description, lists::date_created))
            .filter(user_lists::user_id.eq(user_id))
            .load::<List>(conn);
        match possible_lists {
            Ok(result_lists) => Some(result_lists),
            Err(_) => None,
        }
    }
pub fn find_lists_for_user ( user_id : i32 , conn : & PgConnection ) -> Option < Vec < List > > { let possible_lists = lists :: table . inner_join ( user_lists :: table . on ( lists :: list_id . eq ( user_lists :: list_id ) ) ) . into_boxed ( ) . select ( ( lists :: list_id , lists :: name , lists :: description , lists :: date_created ) ) . filter ( user_lists :: user_id . eq ( user_id ) ) . load :: < List > ( conn ) ; match possible_lists { Ok ( result_lists ) => Some ( result_lists ) , Err ( _ ) => None , } }
Finds the `List` rows that the given user can access.
Finds the ` List ` rows that the given user can access .
user_id
i32
conn
&PgConnection
user_id
i32
conn
&PgConnection