Struct database::repository::models::User
source · pub struct User {
pub email: String,
pub ouath_id: String,
pub is_teacher: bool,
pub is_student: bool,
pub is_admin: bool,
pub teams: String,
pub class: String,
pub first_name: String,
pub last_name: String,
}
Fields§
§email: String
§ouath_id: String
§is_teacher: bool
§is_student: bool
§is_admin: bool
§teams: String
§class: String
§first_name: String
§last_name: String
Trait Implementations§
source§impl<'update> AsChangeset for &'update User
impl<'update> AsChangeset for &'update User
§type Changeset = <(Grouped<Eq<email, <&'update String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Grouped<Eq<ouath_id, <&'update String as AsExpression<<ouath_id as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_teacher, <&'update bool as AsExpression<<is_teacher as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_student, <&'update bool as AsExpression<<is_student as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_admin, <&'update bool as AsExpression<<is_admin as Expression>::SqlType>>::Expression>>, Grouped<Eq<teams, <&'update String as AsExpression<<teams as Expression>::SqlType>>::Expression>>, Grouped<Eq<class, <&'update String as AsExpression<<class as Expression>::SqlType>>::Expression>>, Grouped<Eq<first_name, <&'update String as AsExpression<<first_name as Expression>::SqlType>>::Expression>>, Grouped<Eq<last_name, <&'update String as AsExpression<<last_name as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
type Changeset = <(Grouped<Eq<email, <&'update String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Grouped<Eq<ouath_id, <&'update String as AsExpression<<ouath_id as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_teacher, <&'update bool as AsExpression<<is_teacher as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_student, <&'update bool as AsExpression<<is_student as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_admin, <&'update bool as AsExpression<<is_admin as Expression>::SqlType>>::Expression>>, Grouped<Eq<teams, <&'update String as AsExpression<<teams as Expression>::SqlType>>::Expression>>, Grouped<Eq<class, <&'update String as AsExpression<<class as Expression>::SqlType>>::Expression>>, Grouped<Eq<first_name, <&'update String as AsExpression<<first_name as Expression>::SqlType>>::Expression>>, Grouped<Eq<last_name, <&'update String as AsExpression<<last_name as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
The update statement this type represents
source§fn as_changeset(self) -> Self::Changeset
fn as_changeset(self) -> Self::Changeset
Convert
self
into the actual update statement being executedsource§impl AsChangeset for User
impl AsChangeset for User
§type Changeset = <(Grouped<Eq<email, <String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Grouped<Eq<ouath_id, <String as AsExpression<<ouath_id as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_teacher, <bool as AsExpression<<is_teacher as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_student, <bool as AsExpression<<is_student as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_admin, <bool as AsExpression<<is_admin as Expression>::SqlType>>::Expression>>, Grouped<Eq<teams, <String as AsExpression<<teams as Expression>::SqlType>>::Expression>>, Grouped<Eq<class, <String as AsExpression<<class as Expression>::SqlType>>::Expression>>, Grouped<Eq<first_name, <String as AsExpression<<first_name as Expression>::SqlType>>::Expression>>, Grouped<Eq<last_name, <String as AsExpression<<last_name as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
type Changeset = <(Grouped<Eq<email, <String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Grouped<Eq<ouath_id, <String as AsExpression<<ouath_id as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_teacher, <bool as AsExpression<<is_teacher as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_student, <bool as AsExpression<<is_student as Expression>::SqlType>>::Expression>>, Grouped<Eq<is_admin, <bool as AsExpression<<is_admin as Expression>::SqlType>>::Expression>>, Grouped<Eq<teams, <String as AsExpression<<teams as Expression>::SqlType>>::Expression>>, Grouped<Eq<class, <String as AsExpression<<class as Expression>::SqlType>>::Expression>>, Grouped<Eq<first_name, <String as AsExpression<<first_name as Expression>::SqlType>>::Expression>>, Grouped<Eq<last_name, <String as AsExpression<<last_name as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
The update statement this type represents
source§fn as_changeset(self) -> Self::Changeset
fn as_changeset(self) -> Self::Changeset
Convert
self
into the actual update statement being executedsource§impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8), __DB> for Userwhere
(String, String, bool, bool, bool, String, String, String, String): FromStaticSqlRow<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8), __DB>,
impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8), __DB> for Userwhere
(String, String, bool, bool, bool, String, String, String, String): FromStaticSqlRow<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7, __ST8), __DB>,
Auto Trait Implementations§
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
Blanket Implementations§
§impl<T> IntoSql for T
impl<T> IntoSql for T
§impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
§const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
The number of fields that this type will consume.