An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

clojure.java.jdbc 0.0.4

July 17, 2011 ·

I've been a bit lapse in announcing new versions on my blog so, to rectify that, this post includes the full set of changes across all four dot releases so far (below). This is mostly a bug fix release, but it also lays the groundwork for exposing more control over the PreparedStatement used in queries, coming in one of the next few dot releases.

In Leiningen, just add [org.clojure/java.jdbc "0.0.4"] to your :dependencies to use this latest release.

Changes in 0.0.4:

  • Fix JDBC-2 by allowing :table-spec {string} at the end of create-table arguments:
    (sql/create-table :foo [:col1 "int"] ["col2" :int]
      :table-spec "ENGINE=MyISAM")
  • Fix JDBC-8 by removing all reflection warnings
  • Fix JDBC-11 by no longer committing the transaction when an Error occurs
  • Clean up as-... functions to reduce use of (binding)
  • Refactor do-prepared*, separating out return keys logic and parameter setting logic
    This is in preparation for exposing more hooks in PreparedStatement creation / manipulation

Changes in 0.0.3:

  • Fix JDBC-10 by using .executeUpdate when generating keys (MS SQL Server, PostgreSQL compatibility issue)

Changes in 0.0.2:

  • Fix JDBC-7 Clojure 1.2 compatibility (thanx to Aaron Bedra!)

Changes in 0.0.1 (compared to clojure.contrib.sql):

  • Exposed print-... functions for exception printing; no longer writes exceptions to *out*
  • Add clojure.java.jdbc/resultset-seq (to replace clojure.core/resultset-seq which should be deprecated)
  • Add support for naming and quoting strategies - see http://clojure.github.com/java.jdbc/doc/clojure/java/jdbc/NameMapping.html
    The formatting is a bit borked, Tom F knows about this and is working on an enhancement to auto-doc to improve it
  • Add ability to return generated keys from single insert operations, add insert-record function
  • Clojure 1.3 compatibility

Tags: clojure · oss

0 responses