Struct metrics_sqlite::Metric
source · pub struct Metric {
pub id: i64,
pub timestamp: f64,
pub metric_key_id: i64,
pub value: f64,
}
Expand description
Metric model for existing entries in sqlite database
Fields§
§id: i64
Unique ID of sample
timestamp: f64
Timestamp of sample
metric_key_id: i64
Key/name of sample
value: f64
Value of sample
Trait Implementations§
source§impl<'__b, __FK> BelongsTo<&MetricKey<'__b>> for Metricwhere
__FK: Hash + Eq,
for<'__a> &'__a i64: Into<Option<&'__a __FK>>,
for<'__a> &'__a MetricKey<'__b>: Identifiable<Id = &'__a __FK>,
impl<'__b, __FK> BelongsTo<&MetricKey<'__b>> for Metricwhere __FK: Hash + Eq, for<'__a> &'__a i64: Into<Option<&'__a __FK>>, for<'__a> &'__a MetricKey<'__b>: Identifiable<Id = &'__a __FK>,
§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
§type ForeignKeyColumn = metric_key_id
type ForeignKeyColumn = metric_key_id
The database column representing the foreign key
of the table this struct represents
source§fn foreign_key(&self) -> Option<&Self::ForeignKey>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
source§fn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
source§impl<'__b, __FK> BelongsTo<MetricKey<'__b>> for Metricwhere
__FK: Hash + Eq,
for<'__a> &'__a i64: Into<Option<&'__a __FK>>,
for<'__a> &'__a MetricKey<'__b>: Identifiable<Id = &'__a __FK>,
impl<'__b, __FK> BelongsTo<MetricKey<'__b>> for Metricwhere __FK: Hash + Eq, for<'__a> &'__a i64: Into<Option<&'__a __FK>>, for<'__a> &'__a MetricKey<'__b>: Identifiable<Id = &'__a __FK>,
§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
§type ForeignKeyColumn = metric_key_id
type ForeignKeyColumn = metric_key_id
The database column representing the foreign key
of the table this struct represents
source§fn foreign_key(&self) -> Option<&Self::ForeignKey>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
source§fn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
source§impl<'ident> Identifiable for &'ident Metric
impl<'ident> Identifiable for &'ident Metric
source§impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3> Queryable<(__ST0, __ST1, __ST2, __ST3), __DB> for Metricwhere
(i64, f64, i64, f64): FromStaticSqlRow<(__ST0, __ST1, __ST2, __ST3), __DB>,
impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3> Queryable<(__ST0, __ST1, __ST2, __ST3), __DB> for Metricwhere (i64, f64, i64, f64): FromStaticSqlRow<(__ST0, __ST1, __ST2, __ST3), __DB>,
Auto Trait Implementations§
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnwindSafe for Metric
Blanket Implementations§
source§impl<'a, Parent, Child> BelongingToDsl<&'a Vec<Parent, Global>> for Childwhere
Child: BelongingToDsl<&'a [Parent]>,
impl<'a, Parent, Child> BelongingToDsl<&'a Vec<Parent, Global>> for Childwhere 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
source§fn belonging_to(
parents: &'a Vec<Parent, Global>
) -> <Child as BelongingToDsl<&'a Vec<Parent, Global>>>::Output
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
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> Self::Expressionwhere Self: AsExpression<T> + Sized, T: SqlType + TypedExpressionType,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,
Convert
&self
to an expression for Diesel’s query builder. Read moresource§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,
source§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.