keredson / peewee

a small, expressive orm -- supports postgresql, mysql and sqlite
http://docs.peewee-orm.com/
MIT License
13 stars 4 forks source link

Using << with an empty list creates an invalid SQL query #6

Closed keredson closed 8 years ago

keredson commented 8 years ago

from @Prillan in https://github.com/coleifer/peewee/issues/860:

psycopg2.ProgrammingError: syntax error at or near ")"

I think either of the following solutions are acceptable:

Not handling this before sending it to the database causes all queries after it to fail (at least on our flask server) with error:

peewee.InternalError: current transaction is aborted, commands ignored until end of transaction block
keredson commented 8 years ago

we also ran across this internally. @neopunisher @smtheard