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};
use influxdb::InfluxDbWriteable;

Timestamp::Now.into_query("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};
use influxdb::InfluxDbWriteable;

Timestamp::Now
    .into_query("measurement")
    .add_tag("field1", 5); // calling `.build()` now would result in a `Err(Error::InvalidQueryError)`

Trait Implementations

Performs the conversion.

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.

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

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

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.

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