athena_rs 3.23.0

Hyper performant polyglot Database driver
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! `/schema` request-parameter normalization helpers.
//!
//! This module owns validation and normalization for the `/schema` endpoint's
//! schema-query parameters.

use actix_web::HttpResponse;

use super::identifier_validation::validate_identifier;
use super::query_contracts::SchemaQuery;

/// Validates and normalizes `/schema` query parameters.
pub(super) fn normalize_schema_query(query: &SchemaQuery) -> Result<String, HttpResponse> {
    validate_identifier(&query.schema_name, "schema_name")
}