On Friday, 8 May 2015 13:48:25 UTC+10, Sean Corfield wrote:
>
> Different database drivers handle different data types in different ways. 
> You’ve extended the protocol to convert Clojure’s BigInt to a string which 
> may work for you, but won’t necessarily work for everyone. That’s why the 
> protocols are provided. See the documentation about them, here:
>
>
> http://clojure-doc.org/articles/ecosystem/java_jdbc/using_sql.html#protocol-extensions-for-transforming-values
>
> For most drivers, java.jdbc’s defaults "do the right thing" for most data 
> types flowing between Clojure and SQL. Every now and then you’ll find a 
> situation that needs an extension to the various protocols in one direction 
> or another.
>
 
OK.  Well, if that is true, then I think the correct solution is to also 
dispatch on the current connection type,
to do the right thing for each kind of back end.

This would be easy if the current connection was known to be held in a 
special variable, say, *database*.  :-)

I will  "fix" for my special case in my own code base, but this not seem to 
me to be a "correct" solution
for an important system library.

   -- Alain



-- 
 <http://www.gocatch.com/>
  Sydney, Australia

  <https://www.facebook.com/goCatch>  <https://twitter.com/gocatchapp>  
<http://www.linkedin.com/company/goCatch>   
<https://itunes.apple.com/au/app/gocatch/id444439909?mt=8>  
<https://play.google.com/store/apps/details?id=com.gocatchapp.goCatch&hl=en>
 

-- 
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/d/optout.

Reply via email to