pub struct Interval {
pub years: i32,
pub months: i32,
pub days: i32,
pub hours: i32,
pub minutes: i32,
pub seconds: i32,
pub nanos: i32,
}Expand description
Represents a BigQuery time INTERVAL value.
§Example
use google_cloud_bigquery::client::BigQuery;
use google_cloud_bigquery::datatypes::Interval;
let client = BigQuery::builder()
.with_project_id("my-project-id")
.build()
.await?;
let mut rows = client
.query("SELECT INTERVAL '1-2 15 5:30:00' YEAR TO SECOND AS duration")
.until_done()
.await?
.read();
if let Some(row) = rows.next().await.transpose()? {
let interval: Interval = row.get("duration");
println!("{} years, {} months, {} days", interval.years, interval.months, interval.days);
}Fields§
§years: i32Years component.
months: i32Months component.
days: i32Days component.
hours: i32Hours component.
minutes: i32Minutes component.
seconds: i32Seconds component.
nanos: i32Nanoseconds component.
Trait Implementations§
impl StructuralPartialEq for Interval
Auto Trait Implementations§
impl Freeze for Interval
impl RefUnwindSafe for Interval
impl Send for Interval
impl Sync for Interval
impl Unpin for Interval
impl UnsafeUnpin for Interval
impl UnwindSafe for Interval
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request