pub struct QueryBuilder { /* private fields */ }
Expand description
Builder for a query request.
Implementations§
Source§impl QueryBuilder
impl QueryBuilder
Sourcepub fn start(self, time: SystemTime) -> Self
pub fn start(self, time: SystemTime) -> Self
Set the start time of the query.
Sourcepub fn start_us(self, time_us: u64) -> Self
pub fn start_us(self, time_us: u64) -> Self
Set the start time of the query as a unix timestamp in microseconds.
Sourcepub fn stop(self, time: SystemTime) -> Self
pub fn stop(self, time: SystemTime) -> Self
Set the end time of the query.
Sourcepub fn stop_us(self, time_us: u64) -> Self
pub fn stop_us(self, time_us: u64) -> Self
Set the end time of the query as a unix timestamp in microseconds.
Sourcepub fn strict(self, strict: bool) -> Self
pub fn strict(self, strict: bool) -> Self
Set the query to be strict. If the query is strict, the query will return an error if any of the conditions are invalid. default: false
Sourcepub fn ext(self, ext: Value) -> Self
pub fn ext(self, ext: Value) -> Self
Set extension parameters for the query. This is a JSON object that will be passed to extensions on the server side.
Sourcepub fn include(self, labels: Labels) -> Self
👎Deprecated since 1.13.0: Use the when
method to set the labels to include in the query.
pub fn include(self, labels: Labels) -> Self
when
method to set the labels to include in the query.Set the labels to include in the query.
Sourcepub fn add_include<Str>(self, key: Str, value: Str) -> Self
👎Deprecated since 1.13.0: Use the when
method to set the labels to exclude from the query.
pub fn add_include<Str>(self, key: Str, value: Str) -> Self
when
method to set the labels to exclude from the query.Add a label to include in the query.
Sourcepub fn exclude(self, labels: Labels) -> Self
👎Deprecated since 1.13.0: Use the when
method to set the labels to exclude from the query.
pub fn exclude(self, labels: Labels) -> Self
when
method to set the labels to exclude from the query.Set the labels to exclude from the query.
Sourcepub fn add_exclude<Str>(self, key: Str, value: Str) -> Self
👎Deprecated since 1.13.0: Use the when
method to add a label to exclude from the query.
pub fn add_exclude<Str>(self, key: Str, value: Str) -> Self
when
method to add a label to exclude from the query.Add a label to exclude from the query.
Sourcepub fn each_s(self, each_s: f64) -> Self
pub fn each_s(self, each_s: f64) -> Self
Set S, to return a record every S seconds. default: return all records
Sourcepub fn each_n(self, each_n: u64) -> Self
pub fn each_n(self, each_n: u64) -> Self
Set N, to return every N records. default: return all records
Sourcepub fn continuous(self) -> Self
pub fn continuous(self) -> Self
Set the query to be continuous.
Sourcepub async fn send(
self,
) -> Result<impl Stream<Item = Result<Record, ReductError>>, ReductError>
pub async fn send( self, ) -> Result<impl Stream<Item = Result<Record, ReductError>>, ReductError>
Send the query request.