Misc #35

Merged
oysteikt merged 13 commits from misc into main 2024-08-07 17:29:15 +02:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit 9d0b632e9c - Show all commits

View File

@ -148,10 +148,12 @@ pub async fn close_database_connection(conn: MySqlConnection) {
}
}
#[inline]
pub fn quote_literal(s: &str) -> String {
format!("'{}'", s.replace('\'', r"\'"))
}
#[inline]
pub fn quote_identifier(s: &str) -> String {
format!("`{}`", s.replace('`', r"\`"))
}