nom-sql
nom-sql copied to clipboard
`is null` is not an equivalent of `= null`
i stumbled across this line.
would consumers ever need to know about "IS NULL" vs. "= NULL"?
select 1 from t where id is null
select 1 from t where id = null
The result of parsing these queries is the same but is null is not an equivalent of = null. The latter query actually returns "wrong" results.
https://stackoverflow.com/questions/9581745/sql-is-null-and-null
Thanks, I'll take a look at changing this. Should just be a matter of emitting an Operator::Is instead of Operator::Equals, I think.