refactor(sql): share DDL rendering between transfer and schema diff

This commit is contained in:
jearhe authored and GitHub committed 2026-10-06 22:45:27 +08:00
1 parent 9ca4ab8c6c
commit 88755811ba
7 files changed
+101 -42

No files matched your search

@@ -158,6 +158,14 @@ mod tests {
use super::*;
use serde_json::json;
#[test]
fn string_literal_quotes_normal_unicode_empty_and_apostrophe_values() {
assert_eq!(quote_string_literal("hello"), "'hello'");
assert_eq!(quote_string_literal("O'Reilly"), "'O''Reilly'");
assert_eq!(quote_string_literal(""), "''");
assert_eq!(quote_string_literal("中文注释"), "'中文注释'");
}
#[test]
fn pg_array_literal_without_backslashes_stays_a_plain_string() {
assert_eq!(format_pg_array_sql_literal(&[]), "'{}'");