- .inner_join(community::table.on(post::community_id.eq(community::id)))
- .inner_join(person::table.on(comment_report::creator_id.eq(person::id)))
- .inner_join(person_alias_1::table.on(post::creator_id.eq(person_alias_1::id)))
- // Test this join
- .inner_join(
- community_moderator::table.on(
- community_moderator::community_id
- .eq(post::community_id)
- .and(community_moderator::person_id.eq(self.my_person_id)),
- ),
- )
- .inner_join(
- comment_aggregates::table.on(comment_report::comment_id.eq(comment_aggregates::comment_id)),
- )
- .left_join(
- community_person_ban::table.on(
- community::id
- .eq(community_person_ban::community_id)
- .and(community_person_ban::person_id.eq(comment::creator_id)),
- ),
- )
- .left_join(
- comment_like::table.on(
- comment::id
- .eq(comment_like::comment_id)
- .and(comment_like::person_id.eq(self.my_person_id)),
- ),
- )
- .left_join(
- person_alias_2::table.on(comment_report::resolver_id.eq(person_alias_2::id.nullable())),
- )
- .select((
- comment_report::all_columns,
- comment::all_columns,
- post::all_columns,
- Community::safe_columns_tuple(),
- Person::safe_columns_tuple(),
- PersonAlias1::safe_columns_tuple(),
- comment_aggregates::all_columns,
- community_person_ban::all_columns.nullable(),
- comment_like::score.nullable(),
- PersonAlias2::safe_columns_tuple().nullable(),
- ))