Skip to content

Commit

Permalink
fix: literalToSQL should use replaceAll, not just replace to escape q…
Browse files Browse the repository at this point in the history
…uotes (uwdata#660)
  • Loading branch information
domoritz authored Jan 28, 2025
1 parent 3e0577a commit 9450349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sql/src/ast/literal.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function literalToSQL(value) {
case 'number':
return Number.isFinite(value) ? `${value}` : 'NULL';
case 'string':
return `'${value.replace(`'`, `''`)}'`;
return `'${value.replaceAll(`'`, `''`)}'`;
case 'boolean':
return value ? 'TRUE' : 'FALSE';
default:
Expand Down

0 comments on commit 9450349

Please sign in to comment.