OR's in db/from
AlecTroemel opened this issue · comments
Alec Troemel commented
is it possible to do WHERE ... OR ...
queries in db/from
? Something like this
(db/from :tablename :where {:a a} :or {:b b})
(the above doesn't work as far as i can tell)
swlkr commented
It's not quite what you were asking but you can do this:
(db/from :table :where ["a = ? or b = ?" a b])
Alec Troemel commented
nice! That does what I need 👍 thanks for the awesome project!