athena_rs 3.26.2

Hyper performant polyglot Database driver
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use actix_web::HttpRequest;

/// Compatibility wrapper that keeps the Actix request boundary in `athena_rs`
/// while delegating grammar parsing to the portable `athena-gateway` crate.
pub fn parse_postgrest_query(
    _table_name: &str,
    req: &HttpRequest,
    force_snake_case: bool,
) -> Result<athena_gateway::PostgrestQuery, String> {
    let range_header = req
        .headers()
        .get("Range")
        .and_then(|value| value.to_str().ok());
    athena_gateway::parse_postgrest_query(req.query_string(), range_header, force_snake_case)
}