pub struct CDataSet {Show 45 fields
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>,
}Expand description
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: String§locid: i64§location_lat: Option<f64>§location_long: Option<f64>§date_julian: i32§day_index_0: i32§day_index_1: i32§day_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: i64§absolute_deaths: i64§absolute_recovered: i64§absolute_infected: i64§absolute_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: i64§delta_deaths: i64§delta_recovered: i64§delta_infected: i64§delta_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§
Source§impl CDataSet
impl CDataSet
Sourcepub fn bind_query<'q>(self, query: Query<'q, Sqlite>) -> Query<'q, Sqlite>
pub fn bind_query<'q>(self, query: Query<'q, Sqlite>) -> Query<'q, Sqlite>
Bind all the parameters to a query, perhaps as generated by [insert_str].
Sourcepub fn insert_str() -> &'static str
pub fn insert_str() -> &'static str
Gets an INSERT INTO string representing all the values in the table.
Sourcepub fn dup_day(self) -> Self
pub fn dup_day(self) -> Self
Zeroes out the delta parameters so that this can reflect a duplicate day
Sourcepub fn set_date(&mut self, julian: i32)
pub fn set_date(&mut self, julian: i32)
Sets all date fields in the struct to appropriate representations of the given Julian date.
Sourcepub fn set_date_julianday(&mut self, jd: &JulianDay)
pub fn set_date_julianday(&mut self, jd: &JulianDay)
Sets all date fields in the struct to the appropriate representation of
the given JulianDay.
Sourcepub fn set_date_naivedate(&mut self, nd: &NaiveDate)
pub fn set_date_naivedate(&mut self, nd: &NaiveDate)
Sets all date fields in the struct to the appropriate representation of
the given NaiveDate from the chrono package.
Trait Implementations§
Source§impl<'a, R: Row<'a>> FromRow<'a, R> for CDataSetwhere
&'a str: ColumnIndex<'a, R>,
String: Decode<'a, R::Database> + Type<R::Database>,
i64: Decode<'a, R::Database> + Type<R::Database>,
Option<f64>: Decode<'a, R::Database> + Type<R::Database>,
i32: Decode<'a, R::Database> + Type<R::Database>,
Option<i32>: Decode<'a, R::Database> + Type<R::Database>,
Option<i64>: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row<'a>> FromRow<'a, R> for CDataSetwhere
&'a str: ColumnIndex<'a, R>,
String: Decode<'a, R::Database> + Type<R::Database>,
i64: Decode<'a, R::Database> + Type<R::Database>,
Option<f64>: Decode<'a, R::Database> + Type<R::Database>,
i32: Decode<'a, R::Database> + Type<R::Database>,
Option<i32>: Decode<'a, R::Database> + Type<R::Database>,
Option<i64>: Decode<'a, R::Database> + Type<R::Database>,
impl StructuralPartialEq for CDataSet
Auto Trait Implementations§
impl Freeze for CDataSet
impl RefUnwindSafe for CDataSet
impl Send for CDataSet
impl Sync for CDataSet
impl Unpin for CDataSet
impl UnsafeUnpin for CDataSet
impl UnwindSafe for CDataSet
Blanket Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more