| 1 | module main |
| 2 | |
| 3 | fn test_sql_table_quotes_identifiers() { |
| 4 | assert sql_table('Commit') == '"commit"' |
| 5 | assert sql_table('weird"name') == '"weird""name"' |
| 6 | } |
| 7 | |
| 8 | fn test_sql_literal_escapes_single_quotes() { |
| 9 | assert sql_literal("bob's repo") == "'bob''s repo'" |
| 10 | } |
| 11 | |
| 12 | fn test_sql_like_pattern_wraps_and_escapes_query() { |
| 13 | assert sql_like_pattern("bob's") == "'%bob''s%'" |
| 14 | } |
| 15 |