Struct rinfluxdb::influxql::QueryBuilder [−][src]
pub struct QueryBuilder { /* fields omitted */ }
Expand description
A builder for InfluxQL queries
let query = QueryBuilder::from("indoor_environment") .field("temperature") .field("humidity") .start(Utc.ymd(2021, 3, 7).and_hms(21, 0, 0)) .build(); assert_eq!( query.as_ref(), "SELECT temperature, humidity \ FROM indoor_environment \ WHERE time > '2021-03-07T21:00:00Z'", );
Implementations
Create a query selecting from a measurement
This sets the measurement in the FROM
clause.
Set the database
This sets the database in the FROM
clause:
database.retention_policy.measurement
.
Set the retention policy
This sets the retention policy in the FROM
clause:
database.retention_policy.measurement
.
Restrict query results to a start time
Restrict query results to a stop time
Auto Trait Implementations
impl RefUnwindSafe for QueryBuilder
impl Send for QueryBuilder
impl Sync for QueryBuilder
impl Unpin for QueryBuilder
impl UnwindSafe for QueryBuilder