Skip to main content

redact_sql_for_logging

Function redact_sql_for_logging 

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

Renders SQL for statement arrival logging: parsed and displayed with its literals redacted, which is the same redaction the statement log applies. When the text does not parse or exceeds the statement batch size limit, a placeholder with the byte length is returned. Raw text is never returned, so a statement that crashes the parser is not captured, an accepted limitation.