Skip to main content

sanitize

Function sanitize 

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

sql with every literal replaced by ?, comments removed and runs of space made one, as the database conventions ask before recording db.query.text. Placeholders stay, and an IN list of literals collapses to IN (?).