Skip to main content

normalize_cache_key

Function normalize_cache_key 

Source
pub fn normalize_cache_key(sql: &str) -> String
Expand description

Normalise a raw SQL query into a cache-friendly canonical form. Stable across whitespace, case, and literal values; identical AST shapes collapse to the same output.

Worst case O(n) where n = input length, O(1) state. No allocation beyond the output string.