[−][src]Struct influxdb::WriteQuery
Internal Representation of a Write query that has not yet been built
Methods
impl WriteQuery
[src]
pub fn new<S>(timestamp: Timestamp, measurement: S) -> Self where
S: Into<String>,
[src]
S: Into<String>,
Creates a new WriteQuery
pub fn add_field<S, F>(self, tag: S, value: F) -> Self where
S: Into<String>,
F: WriteField,
[src]
S: Into<String>,
F: WriteField,
Adds a field to the WriteQuery
Examples
use influxdb::{Query, Timestamp}; Query::write_query(Timestamp::Now, "measurement").add_field("field1", 5).build();
pub fn add_tag<S, I>(self, tag: S, value: I) -> Self where
S: Into<String>,
I: Into<Type>,
[src]
S: Into<String>,
I: Into<Type>,
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)`
pub fn get_precision(&self) -> String
[src]
Trait Implementations
impl<'a> From<&'a WriteQuery> for QueryTypes<'a>
[src]
fn from(query: &'a WriteQuery) -> Self
[src]
impl Query for WriteQuery
[src]
Auto Trait Implementations
impl RefUnwindSafe for WriteQuery
impl Send for WriteQuery
impl Sync for WriteQuery
impl Unpin for WriteQuery
impl UnwindSafe for WriteQuery
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
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>,