bitemyapp / esqueleto

New home of Esqueleto, please file issues so we can get things caught up!
BSD 3-Clause "New" or "Revised" License
370 stars 107 forks source link

Avoid generating an empty list as the left operand to NOT IN #273

Closed cdparks closed 3 years ago

cdparks commented 3 years ago

Postgres treats x in () and x not in () as syntax errors. Instead translate:

  x in ()      ⇒  FALSE
  x not in ()  ⇒  TRUE

Older versions of esqueleto did both of these, but apparently the latter got lost in the most recent version. See issue #272.

Before submitting your PR, check that you've:

After submitting your PR:

cdparks commented 3 years ago

@belevy let me know if I bumped the version/updated the changelog correctly

belevy commented 3 years ago

Yah, this is fixing a bug that was introduced. The behavior isnt new. I think the minor bump is fine.

belevy commented 3 years ago

Thank you for the fix :D