Re: Awkward Booleans from contrib.sql

2009-07-01 Thread Vagif Verdi
I just got an advise from IRC to use (boolean x). Problem solved :) --~--~-~--~~~---~--~~ 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 n

Awkward Booleans from contrib.sql

2009-07-01 Thread Vagif Verdi
Here's some warts, when working with boolean fields from sql databases. (if (with-db (sql-val ["select convert(bit, 0)"])) "Yes", "no") will return "Yes". This is because contrib.sql returns java Booleans, not clojure tru/false. (if (= false (with-db (sql-val ["select null"]))) "Yes", "no") wi