Kitura / Swift-Kuery-ORM

An ORM for Swift, built on Codable
Apache License 2.0
212 stars 30 forks source link

Use WHERE IN clauses #114

Open djones6 opened 5 years ago

djones6 commented 5 years ago

While assembling the WHERE clause for a Filter, judging by the tests, we are producing a list of (item = 'a') OR (item = 'b') rather than using the WHERE item IN (a,b) syntax.

Doing so would mean the query more closely resembles the filter and I think would mean the tests are more readable.

There might be a small benefit also in terms of saving bandwidth (presumably, that verbose query has to go over the wire to the DB). I understand that DB typically translates this into a list of OR clauses anyway, so it doesn't offer any performance advantage in that respect.

kilnerm commented 5 years ago

This is definitely worth looking into.