Open
Description
This issue captures some discussion from #21
@pcpthm and @Drevoed suggest refactoring the query to something like this, removing the InfluxDbQuery trait and instead turning that into an Enum.
pub enum InfluxDbQuery {
Write(InfluxDbWriteQuery),
Read(InfluxDbReadQuery)
}
impl InfluxDbQuery {
pub fn build(&self) -> Result<ValidQuery, InfluxDbError> {
use InfluxDbQuery::*;
match self {
Write(write_query) => write_query.build(),
Read(read_query) => read_query.build()
}
}
}