Skip to main content

CDataSet

Struct CDataSet 

Source
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

Source

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].

Source

pub fn insert_str() -> &'static str

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

Source

pub fn dup_day(self) -> Self

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

Source

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

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

Source

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

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

Source

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 Clone for CDataSet

Source§

fn clone(&self) -> CDataSet

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CDataSet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, R: Row<'a>> FromRow<'a, R> for CDataSet
where &'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>,

Source§

fn from_row(row: &R) -> Result<Self>

Source§

impl PartialEq for CDataSet

Source§

fn eq(&self, other: &CDataSet) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for CDataSet

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more