Skip to main content

to_pretty

Function to_pretty 

Source
pub fn to_pretty<T: AstInfo<NestedStatement = Statement<Raw>>>(
    stmt: &Statement<T>,
    config: PrettyConfig,
) -> String
Expand description

Pretty prints a statement at a width.

Bounded on NestedStatement = Statement<Raw> (true for every AstInfo — both Raw and Aug nest a raw statement) so that DECLARE/PREPARE can recurse into their inner statement’s pretty doc, which is what keeps a secret in the inner statement (e.g. a role password) lossless rather than redacted.