comment::{Comment, CommentSaved},
comment_reply::CommentReply,
community::{Community, CommunityFollower, CommunityPersonBan, CommunitySafe},
comment::{Comment, CommentSaved},
comment_reply::CommentReply,
community::{Community, CommunityFollower, CommunityPersonBan, CommunitySafe},
- person::{Person, PersonAlias1, PersonSafe, PersonSafeAlias1},
+ person::{Person, PersonSafe},
CommentAggregates,
Option<CommunityPersonBan>,
Option<CommunityFollower>,
CommentAggregates,
Option<CommunityPersonBan>,
Option<CommunityFollower>,
comment_reply_id: CommentReplyId,
my_person_id: Option<PersonId>,
) -> Result<Self, Error> {
comment_reply_id: CommentReplyId,
my_person_id: Option<PersonId>,
) -> Result<Self, Error> {
// The left join below will return None in this case
let person_id_join = my_person_id.unwrap_or(PersonId(-1));
// The left join below will return None in this case
let person_id_join = my_person_id.unwrap_or(PersonId(-1));
.inner_join(person::table.on(comment::creator_id.eq(person::id)))
.inner_join(post::table.on(comment::post_id.eq(post::id)))
.inner_join(community::table.on(post::community_id.eq(community::id)))
.inner_join(person::table.on(comment::creator_id.eq(person::id)))
.inner_join(post::table.on(comment::post_id.eq(post::id)))
.inner_join(community::table.on(post::community_id.eq(community::id)))
.inner_join(comment_aggregates::table.on(comment::id.eq(comment_aggregates::comment_id)))
.left_join(
community_person_ban::table.on(
.inner_join(comment_aggregates::table.on(comment::id.eq(comment_aggregates::comment_id)))
.left_join(
community_person_ban::table.on(
Person::safe_columns_tuple(),
post::all_columns,
Community::safe_columns_tuple(),
Person::safe_columns_tuple(),
post::all_columns,
Community::safe_columns_tuple(),
comment_aggregates::all_columns,
community_person_ban::all_columns.nullable(),
community_follower::all_columns.nullable(),
comment_aggregates::all_columns,
community_person_ban::all_columns.nullable(),
community_follower::all_columns.nullable(),
my_person_id: Option<PersonId>,
recipient_id: Option<PersonId>,
sort: Option<CommentSortType>,
my_person_id: Option<PersonId>,
recipient_id: Option<PersonId>,
sort: Option<CommentSortType>,
// The left join below will return None in this case
let person_id_join = self.my_person_id.unwrap_or(PersonId(-1));
// The left join below will return None in this case
let person_id_join = self.my_person_id.unwrap_or(PersonId(-1));
.inner_join(person::table.on(comment::creator_id.eq(person::id)))
.inner_join(post::table.on(comment::post_id.eq(post::id)))
.inner_join(community::table.on(post::community_id.eq(community::id)))
.inner_join(person::table.on(comment::creator_id.eq(person::id)))
.inner_join(post::table.on(comment::post_id.eq(post::id)))
.inner_join(community::table.on(post::community_id.eq(community::id)))
.inner_join(comment_aggregates::table.on(comment::id.eq(comment_aggregates::comment_id)))
.left_join(
community_person_ban::table.on(
.inner_join(comment_aggregates::table.on(comment::id.eq(comment_aggregates::comment_id)))
.left_join(
community_person_ban::table.on(
Person::safe_columns_tuple(),
post::all_columns,
Community::safe_columns_tuple(),
Person::safe_columns_tuple(),
post::all_columns,
Community::safe_columns_tuple(),
comment_aggregates::all_columns,
community_person_ban::all_columns.nullable(),
community_follower::all_columns.nullable(),
comment_aggregates::all_columns,
community_person_ban::all_columns.nullable(),
community_follower::all_columns.nullable(),