Skip to main content

fingerprint_of

Function fingerprint_of 

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

Literal-stripped fingerprint of a statement: the first 16 hex chars of the SHA-256 of the normalized token stream. Tokenizes internally; the token stream is an implementation detail and does not appear in the signature.

This is what makes the dashboard case work: consecutive refreshes of the same panel differ only in their time-range literals, so they collapse to one fingerprint. Tokenization failure (unparseable SQL) falls back to hashing the whitespace-collapsed raw text, so a fingerprint always exists.