Jaymon / prom

A PostgreSQL or SQLite orm for Python
MIT License
22 stars 4 forks source link

Add support for ANY? #152

Open Jaymon opened 1 year ago

Jaymon commented 1 year ago

This might simplify some things

"SELECT * FROM foo WHERE id IN %s", [10, 20, 30]

"SELECT * FROM foo WHERE id = ANY(%s)", [10, 20, 30]

via

Note that ANY() can be used with psycopg2 too, and has the advantage of accepting an empty list of values too as argument, which is not supported by the IN operator instead.