(premature send, sorry)

For example:

(sql/db-transaction [t (db/connection)] (select-users t))

will cause a NullPointerException as the query doesn't get executed until
after the transaction is commited. Adding a (doall), or actually using the
result in the form obviously works around this, but I was still scratching
my head until I looked into the source.


On Sat, Nov 23, 2013 at 11:58 AM, Paul Samways <p...@paulsamways.com> wrote:

> Great work Kris, provides just enough abstraction over jdbc without
> getting in the way. One question though, and this may be just because I am
> relatively new to Clojure, but making the returned query lazy seems to be a
> bit of a gotch'ya.
>
> For example:
>
>
>
> On Mon, Nov 11, 2013 at 10:10 PM, Kris Jenkins <krisajenk...@gmail.com>wrote:
>
>> https://github.com/krisajenkins/yesql
>>
>> Yesql is a simple library for blending SQL & Clojure together, cleanly.
>> Here's how it works <https://github.com/krisajenkins/yesql#rationale>,
>> and how to use it <https://github.com/krisajenkins/yesql#example-usage>.
>>
>> Feedback welcomed,
>> Kris
>>
>> --
>> --
>> 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.
>>
>
>

-- 
-- 
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