clojure.java.jdbc.sql is a deliberately minimal DSL - Justin Kramer's
HoneySQL is what I recommend for more expressive SQL construction
(that's the "official" recommendation based on discussions Justin and
I had about java.jdbc and HoneySQL at Clojure/conj 2012).

Sean

On Mon, Jul 8, 2013 at 5:47 PM, Jeremy Heiler <jeremyhei...@gmail.com> wrote:
> On July 8, 2013 at 5:28:13 PM, Colin Yates (colin.ya...@gmail.com) wrote:
>
> Using the latest release of java.jdbc, does anybody know how I can construct
> a where clause when I want to check if the value is one of many values?
>
> For example, if I have a filter {:age [1 2 3 4]} then (sql/where filter)
> causes an error: "Wrong data type: java.lang.NumberFormatException: For
> input string: "[1 2 3 4]".
>
> Any idea how to do this in clojure.java.jdbc?
>
> It doesn't look like `where` supports OR or IN at the moment.
>
> https://github.com/clojure/java.jdbc/blob/f9ecadd03c1c2e01f107155b03061ac0b20f976c/src/main/clojure/clojure/java/jdbc/sql.clj#L292
>
> Perhaps you can look at honeysql for a more sophisticated DSL?
>
> https://github.com/jkk/honeysql
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to