# mquery (placeholder name)
A Rust library for handling PROMQL (and possibly MetricsQL) queries.

## Usage Example
```rust
use mquery::{Auth, QueryManager};

#[tokio::main]
async fn main() {
    dotenv::dotenv().expect("No .env file found in working dir");
    let url = std::env::var("VM_URL").expect("VM URL not found in env");
    let token = std::env::var("VM_TOKEN").expect("VM URL not found in env");
    let query = "total_http_requests";

    let _response = QueryManager::new(url.parse().unwrap())
                      .auth(Auth::Bearer(token))
                      .query(query)
                      .await
                      .expect("operation failed");
}
```

# Roadmap
- [x] Basic raw queries (Instant and Ranged)
- [ ] Query Builder
  - [ ] Basic queries
  - [ ] Operators
  - [ ] Functions
- [ ] Runtime syntax checking
- [ ] Compile time syntax checking
- [ ] Deserialize to custom data types (with the help of proc-macros?)
- [ ] Encapsulated raw queries with methods for constructing interpolated versions