Skip to main content

escape_ident

Function escape_ident 

Source
pub fn escape_ident(s: &str) -> String
Expand description

Escape a SQL identifier by doubling internal double-quotes.

Does not wrap in quotes — use quote_ident for that.

§Example

assert_eq!(dbrest::query::sql_builder::escape_ident("col"), "col");
assert_eq!(dbrest::query::sql_builder::escape_ident("a\"b"), "a\"\"b");