Hey guys,

Just started looking at clojure-contrib's sql namespace, however, using the
following code:

(let [user_id (.toString (java.util.UUID/randomUUID))]
  (sql/with-connection db (sql/insert-records
    :users
    {:user_id user_id})))

and clojure-contrib-1.0-20090421.092453-8.jar seems to generate:

java.lang.Exception: transaction rolled back: Batch entry 0 INSERT INTO
users (user_id) VALUES (c3583933-cc55-4007-b857-b24441cfe409) was aborted.
 Call getNextException to see the cause.
at
clojure.contrib.sql.internal$transaction_STAR___4079.invoke(internal.clj:95)
 at clojure.contrib.sql$do_prepared__4108.doInvoke(sql.clj:87)
at clojure.lang.RestFn.applyTo(RestFn.java:144)

I see that theres no quotes around the value, even if I change the code to
use {:user_id "testing"} I get "VALUES (testing)".

Is there something I'm missing?




...and then Buffy staked Edward.  The End.

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

Reply via email to