Skip to main content

normalize_query

Function normalize_query 

Source
pub fn normalize_query(query: &str) -> String
Expand description

Normalize a query string into a stable cache key: trim surrounding whitespace and collapse horizontal whitespace runs into a single space.

Content inside single-quoted strings, double-quoted strings, and backtick-quoted identifiers is preserved verbatim, and newlines are kept, so normalization never changes a query’s semantics (e.g. inside string literals or line comments).