Re: clojure.java.jdbc: mapping BigDecimal to double

2011-08-23 Thread gaz jones
the oracle jdbc adapter returns a whole host of strange datatypes. for instance, it returns bigdecimals for numbers you have mapped to be numbers (with a precision, without a scale) in the table. it also returns its own custom time classes. these generally have a toJdbc() method to convert them to

Re: clojure.java.jdbc: mapping BigDecimal to double

2011-08-23 Thread Sean Corfield
On Tue, Aug 23, 2011 at 6:54 PM, HiHeelHottie wrote: > Completely agree with you that it shouldn't automatically map out of > the box. As a newbie to clojure and jdbc, do you have any advice on > how I can get into resultset-seq* to do the mapping? I think it would > be better not to have to map a

Re: clojure.java.jdbc: mapping BigDecimal to double

2011-08-23 Thread Ken Wesson
On Tue, Aug 23, 2011 at 9:54 PM, HiHeelHottie wrote: > Are there any future plans to add a mapping api to resultset-seq or is > the pattern just to chain any custom mappings after resultset-seq? Is wrapping in (map double ...) too much typing? :) -- Protege: What is this seething mass of parent

Re: clojure.java.jdbc: mapping BigDecimal to double

2011-08-23 Thread HiHeelHottie
Hey Sean, I really appreciate the quick response and your work with java.jdbc. Completely agree with you that it shouldn't automatically map out of the box. As a newbie to clojure and jdbc, do you have any advice on how I can get into resultset-seq* to do the mapping? I think it would be better n

Re: clojure.java.jdbc: mapping BigDecimal to double

2011-08-23 Thread Sean Corfield
No, you'd have to do it yourself. Since not all BigDecimal values would fit correctly in double, it would be dangerous for resultset-seq to do it. I expect there are all sorts of JDBC data types that don't quite match Clojure types but I don't think automatically mapping them would be a good idea.