UpdateSessionModel

Struct UpdateSessionModel 

Source
pub struct UpdateSessionModel {
    pub user_uuid: Option<String>,
    pub map_id: Option<String>,
    pub session_date: Option<NaiveDateTime>,
    pub difficulty: Option<String>,
    pub accuracy: Option<f32>,
    pub level: Option<i32>,
    pub game_time: Option<i32>,
    pub score_value: Option<i32>,
    pub targets_hit: Option<i32>,
    pub targets_miss: Option<i32>,
    pub average_offset_time: Option<i32>,
    pub personal_best: Option<bool>,
}

Fields§

§user_uuid: Option<String>§map_id: Option<String>§session_date: Option<NaiveDateTime>§difficulty: Option<String>§accuracy: Option<f32>§level: Option<i32>§game_time: Option<i32>§score_value: Option<i32>§targets_hit: Option<i32>§targets_miss: Option<i32>§average_offset_time: Option<i32>§personal_best: Option<bool>

Trait Implementations§

Source§

impl<'update> AsChangeset for &'update UpdateSessionModel

Source§

type Target = table

The table which Self::Changeset will be updating
Source§

type Changeset = <(Option<Grouped<Eq<user_uuid, <&'update String as AsExpression<<user_uuid as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<map_id, <&'update String as AsExpression<<map_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<session_date, <&'update NaiveDateTime as AsExpression<<session_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<difficulty, <&'update String as AsExpression<<difficulty as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<accuracy, <&'update f32 as AsExpression<<accuracy as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<level, <&'update i32 as AsExpression<<level as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<game_time, <&'update i32 as AsExpression<<game_time as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<score_value, <&'update i32 as AsExpression<<score_value as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<targets_hit, <&'update i32 as AsExpression<<targets_hit as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<targets_miss, <&'update i32 as AsExpression<<targets_miss as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<average_offset_time, <&'update i32 as AsExpression<<average_offset_time as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<personal_best, <&'update bool as AsExpression<<personal_best as Expression>::SqlType>>::Expression>>>) as AsChangeset>::Changeset

The update statement this type represents
Source§

fn as_changeset(self) -> <Self as AsChangeset>::Changeset

Convert self into the actual update statement being executed
Source§

impl AsChangeset for UpdateSessionModel

Source§

type Target = table

The table which Self::Changeset will be updating
Source§

type Changeset = <(Option<Grouped<Eq<user_uuid, <String as AsExpression<<user_uuid as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<map_id, <String as AsExpression<<map_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<session_date, <NaiveDateTime as AsExpression<<session_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<difficulty, <String as AsExpression<<difficulty as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<accuracy, <f32 as AsExpression<<accuracy as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<level, <i32 as AsExpression<<level as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<game_time, <i32 as AsExpression<<game_time as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<score_value, <i32 as AsExpression<<score_value as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<targets_hit, <i32 as AsExpression<<targets_hit as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<targets_miss, <i32 as AsExpression<<targets_miss as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<average_offset_time, <i32 as AsExpression<<average_offset_time as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<personal_best, <bool as AsExpression<<personal_best as Expression>::SqlType>>::Expression>>>) as AsChangeset>::Changeset

The update statement this type represents
Source§

fn as_changeset(self) -> <Self as AsChangeset>::Changeset

Convert self into the actual update statement being executed

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoSql for T

Source§

fn into_sql<T>(self) -> Self::Expression

Convert self to an expression for Diesel’s query builder. Read more
Source§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,

Convert &self to an expression for Diesel’s query builder. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V