diff --git a/README.md b/README.md index aabe2340cb131147ead0fb8305a815dbde7f1d63..0248e873bd51696cebe8fa483cce0c22b1b3ca9d 100644 --- a/README.md +++ b/README.md @@ -36,16 +36,15 @@ Requires a local Victoria Metrics server running at `http://127.0.0.1:8428/` for # Roadmap - [x] Basic raw queries (Instant and Ranged) -- [ ] Query Builder +- [x] Query Builder - [x] Basic queries - - [ ] Operators + - [x] Operators - [x] Binary Operators - [x] Vector matching - - [ ] Aggregation operators - - [ ] Functions -- [ ] Runtime syntax checking -- [ ] Compile time syntax checking + - [x] Aggregation operators (implemented as functions) + - [x] Functions (initial support for most important fns) +- [ ] Runtime syntax checking (?) +- [x] Compile time syntax checking - [x] ~~Deserialize~~ Convert to custom data types - [ ] ORM-like API to build queries using user defined types (derive macro) -- [ ] Encapsulated raw queries with methods for constructing interpolated versions - [ ] Processing multiple queries at once diff --git a/src/result.rs b/src/result.rs index 68d1b1c30e2d668adb4ebdb7b0006d03081296ab..56b25ea21c9f0c3e27267662f479d57723760e26 100644 --- a/src/result.rs +++ b/src/result.rs @@ -23,7 +23,7 @@ impl IntoQryResult for Result<response::PromqlResult, error::Error> { } } -/// A wrapper for possible result types of expression queries ([`Client::query`](crate::Client::query) and [`Client::query_range`](crate::Client::query_range)). +/// A wrapper for possible result types of expression queries #[derive(Clone, Debug, EnumAsInner)] pub enum Data { Vector(Vec<response::InstantVector>), @@ -43,7 +43,7 @@ impl From<response::PromqlResult> for Data { } impl Data { - /// This is a shortcut to check if the query returned any data at all regardless of the exact type. + /// A shortcut to check if the query returned any data at all regardless of the exact type. pub fn is_empty(&self) -> bool { match self { Data::Vector(v) => v.is_empty(), @@ -205,8 +205,7 @@ impl fmt::Display for PrometheusErrorType { } } -/// Is thrown when the [`Client`](crate::Client) or the underlying -/// [`reqwest::Error`] fail to build or execute a request. +/// Is thrown when the [`reqwest::Error`] fails to build or execute a request. #[derive(Debug, Clone)] pub struct ClientError(String);