Struct lemmy_db_schema::source::community::CommunityFollower [−][src]
pub struct CommunityFollower {
pub id: i32,
pub community_id: CommunityId,
pub person_id: PersonId,
pub published: NaiveDateTime,
pub pending: Option<bool>,
}
Fields
id: i32
community_id: CommunityId
person_id: PersonId
published: NaiveDateTime
pending: Option<bool>
Trait Implementations
impl<__FK> BelongsTo<Community> for CommunityFollower where
__FK: Hash + Eq,
for<'__a> &'__a CommunityId: Into<Option<&'__a __FK>>,
for<'__a> &'__a Community: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<Community> for CommunityFollower where
__FK: Hash + Eq,
for<'__a> &'__a CommunityId: Into<Option<&'__a __FK>>,
for<'__a> &'__a Community: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = community_id
type ForeignKeyColumn = community_id
The database column representing the foreign key of the table this struct represents Read more
Returns the foreign key for self
Returns the foreign key column of this struct’s table
type Form = CommunityFollowerForm
fn follow(
conn: &PgConnection,
community_follower_form: &CommunityFollowerForm
) -> Result<Self, Error>
fn follow_accepted(
conn: &PgConnection,
community_id_: CommunityId,
person_id_: PersonId
) -> Result<Self, Error> where
Self: Sized,
fn unfollow(
conn: &PgConnection,
community_follower_form: &CommunityFollowerForm
) -> Result<usize, Error>
fn has_local_followers(
conn: &PgConnection,
community_id_: CommunityId
) -> Result<bool, Error>
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<__DB: Backend, __ST> Queryable<__ST, __DB> for CommunityFollower where
(i32, CommunityId, PersonId, NaiveDateTime, Option<bool>): Queryable<__ST, __DB>,
impl<__DB: Backend, __ST> Queryable<__ST, __DB> for CommunityFollower where
(i32, CommunityId, PersonId, NaiveDateTime, Option<bool>): Queryable<__ST, __DB>,
Auto Trait Implementations
impl RefUnwindSafe for CommunityFollower
impl Send for CommunityFollower
impl Sync for CommunityFollower
impl Unpin for CommunityFollower
impl UnwindSafe for CommunityFollower
Blanket Implementations
impl<'a, Parent, Child> BelongingToDsl<&'a [Parent]> for Child where
Child: HasTable + BelongsTo<Parent>,
&'a Parent: Identifiable,
Vec<<&'a Parent as Identifiable>::Id, Global>: AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>,
<Child as HasTable>::Table: FilterDsl<In<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <Vec<<&'a Parent as Identifiable>::Id, Global> as AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::InExpression>>,
<Child as BelongsTo<Parent>>::ForeignKeyColumn: ExpressionMethods,
impl<'a, Parent, Child> BelongingToDsl<&'a [Parent]> for Child where
Child: HasTable + BelongsTo<Parent>,
&'a Parent: Identifiable,
Vec<<&'a Parent as Identifiable>::Id, Global>: AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>,
<Child as HasTable>::Table: FilterDsl<In<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <Vec<<&'a Parent as Identifiable>::Id, Global> as AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::InExpression>>,
<Child as BelongsTo<Parent>>::ForeignKeyColumn: ExpressionMethods,
type Output = <<Child as HasTable>::Table as FilterDsl<In<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <Vec<<&'a Parent as Identifiable>::Id, Global> as AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::InExpression>>>::Output
type Output = <<Child as HasTable>::Table as FilterDsl<In<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <Vec<<&'a Parent as Identifiable>::Id, Global> as AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::InExpression>>>::Output
The query returned by belonging_to
Get the record(s) belonging to record(s) other
impl<'a, Parent, Child> BelongingToDsl<&'a Vec<Parent, Global>> for Child where
Child: BelongingToDsl<&'a [Parent]>,
impl<'a, Parent, Child> BelongingToDsl<&'a Vec<Parent, Global>> for Child where
Child: BelongingToDsl<&'a [Parent]>,
type Output = <Child as BelongingToDsl<&'a [Parent]>>::Output
type Output = <Child as BelongingToDsl<&'a [Parent]>>::Output
The query returned by belonging_to
pub fn belonging_to(
parents: &'a Vec<Parent, Global>
) -> <Child as BelongingToDsl<&'a Vec<Parent, Global>>>::Output
pub fn belonging_to(
parents: &'a Vec<Parent, Global>
) -> <Child as BelongingToDsl<&'a Vec<Parent, Global>>>::Output
Get the record(s) belonging to record(s) other
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Convert self
to an expression for Diesel’s query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more