Skip to main content

Module sql_quote

Module sql_quote 

Source
Expand description

SQL-standard quoting for identifiers and string literals.

These helpers preserve input bytes other than the delimiter being escaped. They are intended for SQL text reconstruction only; parameter binding remains preferable when the protocol supports it.

Functionsยง

quote_ident
Quote a SQL identifier by doubling embedded double quotes and wrapping the result in double quotes.
quote_literal
Quote a SQL string literal by doubling embedded single quotes and wrapping the result in single quotes.