|
|
|
|
|
by nicoburns
1567 days ago
|
|
I actually think it’s fine to do string sanitising here. The string formats for the databases are well specified, and writing a function to that spec shouldn’t be difficult. I believe there’s no need to parse to AST for postgres as you can just wrap the string in quotes, replace any existing quotes in the string with two quotes and you’re done. If other databases have funkier string formats then you may have a point. at least that’s true for Postgres, I can’t speak for MySQL. |
|