pub fn quote_ident(s: &str, writer: &mut impl Write)
Expand description
Returns the given string suitably quoted to be used as an identifier in an SQL statement string. Quotes are added only if necessary (i.e., if the string contains non-identifier characters or would be case-folded). Embedded quotes are properly doubled.
ยงExample
query T
select quote_ident('foo bar')
----
"foo bar"
query T
select quote_ident('FooBar')
----
"FooBar"
query T
select quote_ident('foo_bar')
----
foo_bar
query T
select quote_ident('foo"bar')
----
"foo""bar"
# FIXME: quote SQL keywords is not supported yet
query T
select quote_ident('select')
----
select