pub trait BelongingToDsl<T> {
type Output: AsQuery;
fn belonging_to(other: T) -> Self::Output;
}
impl<'a, Parent, Child> BelongingToDsl<&'a Parent> for Child where
&'a Parent: Identifiable,
Child: HasTable + BelongsTo<Parent>,
<&'a Parent as Identifiable>::Id: AsExpression<<Child::ForeignKeyColumn as Expression>::SqlType>,
<Child as HasTable>::Table: FilterDsl<Eq<Child::ForeignKeyColumn, <&'a Parent as Identifiable>::Id>>,
Child::ForeignKeyColumn: ExpressionMethods, type Output = FindBy<Child::Table, Child::ForeignKeyColumn, <&'a Parent as Identifiable>::Id>;
impl<'a, Parent, Child> BelongingToDsl<&'a [Parent]> for Child where
&'a Parent: Identifiable,
Child: HasTable + BelongsTo<Parent>,
Vec<<&'a Parent as Identifiable>::Id>: AsInExpression<<Child::ForeignKeyColumn as Expression>::SqlType>,
<Child as HasTable>::Table: FilterDsl<EqAny<Child::ForeignKeyColumn, Vec<<&'a Parent as Identifiable>::Id>>>,
Child::ForeignKeyColumn: ExpressionMethods, type Output = Filter<Child::Table, EqAny<Child::ForeignKeyColumn, Vec<<&'a Parent as Identifiable>::Id>>>;
impl<'a, Parent, Child> BelongingToDsl<&'a Vec<Parent>> for Child where
Child: BelongingToDsl<&'a [Parent]>, type Output = Child::Output;