What?
        org.clojure/java.jdbc “0.5.5”
        Clojure contrib wrapper for JDBC database operations

Where?
        https://github.com/clojure/java.jdbc#change-log

Why?
        In the previous versions (0.5.0 and earlier), options to most functions 
were specified as inline unrolled keyword/value arguments:

        (jdbc/query db [“select * from foo where id = ?” pk]
                     :row-fn :name :result-set-fn first :identifiers identity)

        Whilst this style of argument is convenient from the REPL, it becomes 
increasingly awkward as you start composing functions – you start having to use 
`apply` and `mapcat identity` and so on.

        Version 0.5.5 introduces a single options map argument into all 
functions that previously took unrolled keyword/value arguments. It is the 
optional, last argument in all cases (see caveat below).

        (jdbc/query db [“select * from foo where id = ?” pk]
                     {:row-fn :name :result-set-fn first :identifiers identity})

       Version 0.5.5 continues to support the unrolled option arguments but 
considers them deprecated – and using them will cause a DEPRECATED message to 
be printed to stdout (this was already true for `db-transaction` which was 
deprecated in favor of `with-db-transaction` back in version 0.3.0).

Plans?
        Version 0.5.6 will further clean up the calling syntax for several 
functions. Expect a few API additions and a few more deprecations.
        Version 0.6.0 will remove all deprecated functionality (including the 
old API which continued in java.jdbc.deprecated for several versions). 

Caveat?
        Two functions were problematic since they were already variadic in 
their regular arguments: `insert!` and `create-table-ddl`. In order to flag the 
(optional) options map, these now expect an `:options` argument followed by the 
actual options map. I am considering introducing new functions with better 
argument lists in 0.5.6 to clean this up.

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)




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