tink_sql
tink_sql copied to clipboard
.where(table.field == null) translated to "WHERE false"
Looks like compiler is doing the job. Because the expr was already EConst(false) when it reaches the formatter
Hmm, can you try putting a @:notNull on Field?
Seems no effect. Added a failing test btw
Hmm, can you try putting a @:notNull on Field?
Since the comparison is false, shouldn't it be something like @:canBeNull instead?
Maybe we should add table.field.isNull() instead...
Well, for the time being that would work, although we need to get == to work to avoid people running into this issue.
for reference: https://github.com/haxetink/tink_sql/commit/5ccc214a7859779189ec6e463577f78786709fe5 (added isNull())