Struct sql_parser::ast::IntervalValue[][src]

pub struct IntervalValue {
    pub value: String,
    pub precision_high: DateTimeField,
    pub precision_low: DateTimeField,
    pub fsec_max_precision: Option<u64>,
}
Expand description

An intermediate value for Intervals, which tracks all data from the user, as well as the computed ParsedDateTime.

Fields

value: String

The raw [value] that was present in INTERVAL '[value]'

precision_high: DateTimeField

The most significant DateTimeField to propagate to Interval in compute_interval.

precision_low: DateTimeField

The least significant DateTimeField to propagate to Interval in compute_interval. precision_low is also used to provide a TimeUnit if the final part of value is ambiguous, e.g. INTERVAL ‘1-2 3’ DAY uses ‘day’ as the TimeUnit for 3.

fsec_max_precision: Option<u64>

Maximum nanosecond precision can be specified in SQL source as INTERVAL '__' SECOND(_).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

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

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

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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