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

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

Implementations

Creates a new WriteQuery

Adds a field to the WriteQuery

Examples
use influxdb::{Query, Timestamp};

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

Adds a tag to the WriteQuery

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

Examples
use influxdb::{Query, Timestamp};

Query::write_query(Timestamp::NOW, "measurement")
    .add_tag("field1", 5); // calling `.build()` now would result in a `Err(Error::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.