- .inner_join(community::table.on(post::community_id.eq(community::id)))
- .inner_join(person::table.on(post_report::creator_id.eq(person::id)))
- .inner_join(person_alias_1::table.on(post::creator_id.eq(person_alias_1::id)))
- .left_join(
- community_person_ban::table.on(
- post::community_id
- .eq(community_person_ban::community_id)
- .and(community_person_ban::person_id.eq(post::creator_id))
- .and(
- community_person_ban::expires
- .is_null()
- .or(community_person_ban::expires.gt(now)),
- ),
- ),
- )
- .left_join(
- post_like::table.on(
- post::id
- .eq(post_like::post_id)
- .and(post_like::person_id.eq(self.my_person_id)),
- ),
- )
- .inner_join(post_aggregates::table.on(post_report::post_id.eq(post_aggregates::post_id)))
- .left_join(
- person_alias_2::table.on(post_report::resolver_id.eq(person_alias_2::id.nullable())),
- )
- .select((
- post_report::all_columns,
- post::all_columns,
- Community::safe_columns_tuple(),
- Person::safe_columns_tuple(),
- PersonAlias1::safe_columns_tuple(),
- community_person_ban::all_columns.nullable(),
- post_like::score.nullable(),
- post_aggregates::all_columns,
- PersonAlias2::safe_columns_tuple().nullable(),
- ))