Closed tbantle22 closed 3 weeks ago
Also related in v5.0.0+
sqlify
ing a postgres query does not escape column names in where clauses with double quotes like it used to.
Expected: "SELECT \"name\", \"age\" FROM \"tablename\" WHERE \"id\" = 1"
Received: "SELECT \"name\", \"age\" FROM \"tablename\" WHERE id = 1"
@tbantle22 Do you need keep column quoted always, while ignore the original?
Ok thanks for explaining I understand this change better now. This change broke some of our existing structures but I will try to update them to the new structure for columns
node-sql-parser v4.17.0Updated: for v5.0.0+In v4.17.0 the
columns
were correct, just not thewhere
block columnsThe result of astify on a postgres sql statement with double quoted columns in the columns and where clause should be the same as if the column is not double quoted.
For example, the results of these should be equal, but they are not:
Result:
Should be the same as:
Result