pub struct InfluxDbWriteQuery { /* private fields */ }
Expand description

Internal Representation of a Write query that has not yet been built

Implementations

Creates a new InfluxDbWriteQuery

Adds a field to the InfluxDbWriteQuery

Examples
use influxdb::query::{InfluxDbQuery, Timestamp};

InfluxDbQuery::write_query(Timestamp::NOW, "measurement").add_field("field1", 5).build();

Adds a tag to the InfluxDbWriteQuery

Please note that a InfluxDbWriteQuery requires at least one field. Composing a query with only tags will result in a failure building the query.

Examples
use influxdb::query::{InfluxDbQuery, Timestamp};

InfluxDbQuery::write_query(Timestamp::NOW, "measurement")
    .add_tag("field1", 5); // calling `.build()` now would result in a `Err(InfluxDbError::InvalidQueryError)`

Trait Implementations

Builds valid InfluxSQL which can be run against the Database. In case no fields have been specified, it will return an error, as that is invalid InfluxSQL syntax. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.