[postmodern-devel] "WHERE id IN (1, 2, 3)" conditions

Nicolas Martyanoff khaelin at gmail.com
Wed Dec 28 11:06:46 UTC 2011


Hi,

I'm trying to use queries such as:

SELECT a, b, c FROM foo WHERE id IN (1, 2, 3)

While it's possible to nest queries with IN:

      (:select 'a 'b 'c
               :from 'foo
               :where (:in 'id (:select 'd :from 'bar)))

It's not possible to have:

      (:select 'a 'b 'c
               :from 'foo
               :where (:in 'id (list 1 2 3))

=> Value (1 2 3) can not be converted to an SQL literal.

Would you be ok with lists being converted to (a, b, ...) SQL literals ?

Regards,

-- 
Nicolas Martyanoff
http://codemore.org
khaelin at gmail.com




More information about the postmodern-devel mailing list