[][src]Struct covid19db::dbschema::CDataSet

pub struct CDataSet {
    pub dataset: String,
    pub locid: i64,
    pub location_lat: Option<f64>,
    pub location_long: Option<f64>,
    pub date_julian: i32,
    pub day_index_0: i32,
    pub day_index_1: i32,
    pub day_index_10: Option<i32>,
    pub day_index_100: Option<i32>,
    pub day_index_1k: Option<i32>,
    pub day_index_10k: Option<i32>,
    pub day_index_peak: Option<i32>,
    pub day_index_peak_confirmed: Option<i32>,
    pub day_index_peak_deaths: Option<i32>,
    pub absolute_confirmed: i64,
    pub absolute_deaths: i64,
    pub absolute_recovered: i64,
    pub absolute_infected: i64,
    pub absolute_pop100k_confirmed: Option<f64>,
    pub absolute_pop100k_deaths: Option<f64>,
    pub absolute_pop100k_recovered: Option<f64>,
    pub absolute_pop100k_infected: Option<f64>,
    pub relative_deaths: Option<f64>,
    pub relative_recovered: Option<f64>,
    pub relative_infected: Option<f64>,
    pub delta_confirmed: i64,
    pub delta_deaths: i64,
    pub delta_recovered: i64,
    pub delta_infected: i64,
    pub delta_pct_confirmed: Option<f64>,
    pub delta_pct_deaths: Option<f64>,
    pub delta_pct_recovered: Option<f64>,
    pub delta_pct_infected: Option<f64>,
    pub delta_pop100k_confirmed: Option<f64>,
    pub delta_pop100k_deaths: Option<f64>,
    pub delta_pop100k_recovered: Option<f64>,
    pub delta_pop100k_infected: Option<f64>,
    pub peak_pct_confirmed: Option<f64>,
    pub peak_pct_deaths: Option<f64>,
    pub peak_pct_recovered: Option<f64>,
    pub peak_pct_infected: Option<f64>,
    pub factbook_area: Option<f64>,
    pub factbook_population: Option<i64>,
    pub factbook_death_rate: Option<f64>,
    pub factbook_median_age: Option<f64>,
}

The CDataSet struct represents a row in the cdataset table. It is an instance of sqlx::FromRow for the benefit of users of sqlx::query_as.

Fields

dataset: Stringlocid: i64location_lat: Option<f64>location_long: Option<f64>date_julian: i32day_index_0: i32day_index_1: i32day_index_10: Option<i32>day_index_100: Option<i32>day_index_1k: Option<i32>day_index_10k: Option<i32>day_index_peak: Option<i32>day_index_peak_confirmed: Option<i32>day_index_peak_deaths: Option<i32>absolute_confirmed: i64absolute_deaths: i64absolute_recovered: i64absolute_infected: i64absolute_pop100k_confirmed: Option<f64>absolute_pop100k_deaths: Option<f64>absolute_pop100k_recovered: Option<f64>absolute_pop100k_infected: Option<f64>relative_deaths: Option<f64>relative_recovered: Option<f64>relative_infected: Option<f64>delta_confirmed: i64delta_deaths: i64delta_recovered: i64delta_infected: i64delta_pct_confirmed: Option<f64>delta_pct_deaths: Option<f64>delta_pct_recovered: Option<f64>delta_pct_infected: Option<f64>delta_pop100k_confirmed: Option<f64>delta_pop100k_deaths: Option<f64>delta_pop100k_recovered: Option<f64>delta_pop100k_infected: Option<f64>peak_pct_confirmed: Option<f64>peak_pct_deaths: Option<f64>peak_pct_recovered: Option<f64>peak_pct_infected: Option<f64>factbook_area: Option<f64>factbook_population: Option<i64>factbook_death_rate: Option<f64>factbook_median_age: Option<f64>

Implementations

impl CDataSet[src]

pub fn bind_query<'q>(self, query: Query<'q, Sqlite>) -> Query<'q, Sqlite>[src]

Bind all the parameters to a query, perhaps as generated by [insert_str].

pub fn insert_str() -> &'static str[src]

Gets an INSERT INTO string representing all the values in the table.

pub fn dup_day(self) -> Self[src]

Zeroes out the delta parameters so that this can reflect a duplicate day

pub fn set_date(&mut self, julian: i32)[src]

Sets all date fields in the struct to appropriate representations of the given Julian date.

pub fn set_date_julianday(&mut self, jd: &JulianDay)[src]

Sets all date fields in the struct to the appropriate representation of the given JulianDay.

pub fn set_date_naivedate(&mut self, nd: &NaiveDate)[src]

Sets all date fields in the struct to the appropriate representation of the given NaiveDate from the chrono package.

Trait Implementations

impl Clone for CDataSet[src]

impl Debug for CDataSet[src]

impl<'a, R: Row<'a>> FromRow<'a, R> for CDataSet where
    &'a str: ColumnIndex<'a, R>,
    String: Decode<'a, R::Database>,
    String: Type<R::Database>,
    i64: Decode<'a, R::Database>,
    i64: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    i32: Decode<'a, R::Database>,
    i32: Type<R::Database>,
    i32: Decode<'a, R::Database>,
    i32: Type<R::Database>,
    i32: Decode<'a, R::Database>,
    i32: Type<R::Database>,
    Option<i32>: Decode<'a, R::Database>,
    Option<i32>: Type<R::Database>,
    Option<i32>: Decode<'a, R::Database>,
    Option<i32>: Type<R::Database>,
    Option<i32>: Decode<'a, R::Database>,
    Option<i32>: Type<R::Database>,
    Option<i32>: Decode<'a, R::Database>,
    Option<i32>: Type<R::Database>,
    Option<i32>: Decode<'a, R::Database>,
    Option<i32>: Type<R::Database>,
    Option<i32>: Decode<'a, R::Database>,
    Option<i32>: Type<R::Database>,
    Option<i32>: Decode<'a, R::Database>,
    Option<i32>: Type<R::Database>,
    i64: Decode<'a, R::Database>,
    i64: Type<R::Database>,
    i64: Decode<'a, R::Database>,
    i64: Type<R::Database>,
    i64: Decode<'a, R::Database>,
    i64: Type<R::Database>,
    i64: Decode<'a, R::Database>,
    i64: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    i64: Decode<'a, R::Database>,
    i64: Type<R::Database>,
    i64: Decode<'a, R::Database>,
    i64: Type<R::Database>,
    i64: Decode<'a, R::Database>,
    i64: Type<R::Database>,
    i64: Decode<'a, R::Database>,
    i64: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<i64>: Decode<'a, R::Database>,
    Option<i64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>,
    Option<f64>: Decode<'a, R::Database>,
    Option<f64>: Type<R::Database>, 
[src]

impl PartialEq<CDataSet> for CDataSet[src]

impl StructuralPartialEq for CDataSet[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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