[−][src]Struct influxdb::query::write_query::InfluxDbWriteQuery
Internal Representation of a Write query that has not yet been built
Methods
impl InfluxDbWriteQuery
[src]
pub fn new<S>(timestamp: Timestamp, measurement: S) -> Self where
S: ToString,
[src]
S: ToString,
Creates a new InfluxDbWriteQuery
pub fn add_field<S, I>(self, tag: S, value: I) -> Self where
S: ToString,
I: Into<InfluxDbType>,
[src]
S: ToString,
I: Into<InfluxDbType>,
Adds a field to the InfluxDbWriteQuery
Examples
use influxdb::query::{InfluxDbQuery, Timestamp}; InfluxDbQuery::write_query(Timestamp::NOW, "measurement").add_field("field1", 5).build();
pub fn add_tag<S, I>(self, tag: S, value: I) -> Self where
S: ToString,
I: Into<InfluxDbType>,
[src]
S: ToString,
I: Into<InfluxDbType>,
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)`
pub fn get_precision(&self) -> String
[src]
Trait Implementations
impl InfluxDbQuery for InfluxDbWriteQuery
[src]
Auto Trait Implementations
impl Unpin for InfluxDbWriteQuery
impl Send for InfluxDbWriteQuery
impl Sync for InfluxDbWriteQuery
impl RefUnwindSafe for InfluxDbWriteQuery
impl UnwindSafe for InfluxDbWriteQuery
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,