pub fn quote_literal(value: &str) -> StringExpand description
Quote a SQL string literal (for use in SQL statements)
Escapes single quotes by doubling them and wraps the string in single quotes. Use this for string values in SQL, not for identifiers.
ยงExamples
use database_replicator::utils::quote_literal;
assert_eq!(quote_literal("hello"), "'hello'");
assert_eq!(quote_literal("it's"), "'it''s'");
assert_eq!(quote_literal(""), "''");