use diesel_async::RunQueryDsl;
impl CommunityAggregates {
- pub async fn read(pool: &DbPool, community_id: CommunityId) -> Result<Self, Error> {
+ pub async fn read(pool: &mut DbPool<'_>, community_id: CommunityId) -> Result<Self, Error> {
let conn = &mut get_conn(pool).await?;
community_aggregates::table
.filter(community_aggregates::community_id.eq(community_id))
#[serial]
async fn test_crud() {
let pool = &build_db_pool_for_tests().await;
+ let pool = &mut pool.into();
let inserted_instance = Instance::read_or_create(pool, "my_domain.tld".to_string())
.await