Re: [PATCH] Make clojure.contrib.sql/with-connection return the body result

2008-09-13 Thread Stephen C. Gilardi
On Sep 13, 2008, at 7:44 AM, meredydd wrote: > Hey all, >The current version of the (with-connection) macro in clojure- > contrib doesn't return the result of its body. (It just returns nil > from the commit() call at the end of the transaction). I attach a > patch to achieve this behaviour,

Re: Make clojure.contrib.sql/with-connection return the body result

2008-09-13 Thread Rich Hickey
On Sep 13, 7:44 am, meredydd <[EMAIL PROTECTED]> wrote: > Hey all, > The current version of the (with-connection) macro in clojure- > contrib doesn't return the result of its body. (It just returns nil > from the commit() call at the end of the transaction). I attach a > patch to achieve thi

Re: [PATCH] Make clojure.contrib.sql/with-connection return the body result

2008-09-13 Thread meredydd
Aaand I'm a moron, who managed to screw up posting a trivial patch. This is the version that actually works: (the first was missing a # on body-result): Index: src/clojure/contrib/sql/sql.clj === --- src/clojure/contrib/sql/sql.clj

[PATCH] Make clojure.contrib.sql/with-connection return the body result

2008-09-13 Thread meredydd
Hey all, The current version of the (with-connection) macro in clojure- contrib doesn't return the result of its body. (It just returns nil from the commit() call at the end of the transaction). I attach a patch to achieve this behaviour, so it can be used in a functional style. Meredydd --