Re: Handy clojure function to transform prepared statement queries

2014-02-10 Thread Jan Herich
Thank you for your explanation Kris, i will test this functionality in Yesql. Dňa pondelok, 10. februára 2014 14:40:18 UTC+1 Kris Jenkins napísal(-a): > > Actually, Yesql already supports this, albeit unofficially. Here's an > example, but please read the caveat at the end before you use it... >

Re: Handy clojure function to transform prepared statement queries

2014-02-10 Thread Kris Jenkins
Actually, Yesql already supports this, albeit unofficially. Here's an example, but please read the caveat at the end before you use it... Define an IN-query with one parameter: -- name: find-by-age SELECT * FROM person WHERE age IN (:age) Call it, supplying a vector for age: (find-by-age db-sp

Re: Handy clojure function to transform prepared statement queries

2014-02-10 Thread Jan Herich
The "problem" with libraries you mentioned is that those are fully featured DSLs for embedding SQL queries as clojure macros/function calls in your program. However, i like the philosophy of Yesql library, which leverages clojure/java.jdbc library but enc

Re: Handy clojure function to transform prepared statement queries

2014-02-09 Thread Sean Corfield
As maintainer of java.jdbc I'd say this is a more appropriate feature for a DSL library like SQLingvo or HoneySQL (which may already support something like this - I haven't checked). Sean On Sun, Feb 9, 2014 at 12:40 PM, Jan Herich wrote: > Hello folks, > > In the last days, i was working with c

Handy clojure function to transform prepared statement queries

2014-02-09 Thread Jan Herich
Hello folks, In the last days, i was working with clojure/java.jdbc and yesql libraries (which are both great piece of work), the experience was overall very positive, but one thing bothered me, that i was unable to use plain prepared statements (and sadly, yesql) when working with IN clauses