diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE new file mode 100644 index 00000000..686625a4 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE @@ -0,0 +1,14 @@ +Hi! Thanks for your interest in contributing to this project. + +Clojure contrib projects do not use GitHub issues or pull requests, and +require a signed Contributor Agreement. If you would like to contribute, +please read more about the CA and sign that first (this can be done online). + +Then go to this project's issue tracker in JIRA to create tickets, update +tickets, or submit patches. For help in creating tickets and patches, +please see: + +- Signing the CA: https://clojure.org/community/contributing +- Creating Tickets: https://clojure.org/community/creating_tickets +- Developing Patches: https://clojure.org/community/developing_patches +- Contributing FAQ: https://clojure.org/community/contributing diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml new file mode 100644 index 00000000..c7a04465 --- /dev/null +++ b/.github/workflows/doc-build.yml @@ -0,0 +1,13 @@ +name: Build API Docs + +permissions: + contents: write + +on: + workflow_dispatch: + +jobs: + call-doc-build-workflow: + uses: clojure/build.ci/.github/workflows/doc-build.yml@master + with: + project: clojure/java.jdbc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..286cf956 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release on demand + +permissions: + contents: write + +on: + workflow_dispatch: + inputs: + releaseVersion: + description: "Version to release" + required: true + snapshotVersion: + description: "Snapshot version after release" + required: true + +jobs: + call-release: + uses: clojure/build.ci/.github/workflows/release.yml@master + with: + releaseVersion: ${{ github.event.inputs.releaseVersion }} + snapshotVersion: ${{ github.event.inputs.snapshotVersion }} + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml new file mode 100644 index 00000000..9fdad8c6 --- /dev/null +++ b/.github/workflows/snapshot.yml @@ -0,0 +1,11 @@ +name: Snapshot on demand + +permissions: + contents: read + +on: [workflow_dispatch] + +jobs: + call-snapshot: + uses: clojure/build.ci/.github/workflows/snapshot.yml@master + secrets: inherit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..2cc441ac --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,10 @@ +name: Test + +permissions: + contents: read + +on: [push] + +jobs: + call-test: + uses: clojure/build.ci/.github/workflows/test.yml@master diff --git a/.gitignore b/.gitignore index 4c0fdbdb..81f14885 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,17 @@ -*.jar +.calva/repl.calva-repl .classpath +.clj-kondo/.cache +.cpcache +.lsp/.cache +.portal .project +.rebl .settings +*.jar /.lein-failures /.lein-repl-history /.nrepl-port +/build.boot /clojure_test_* bin classes @@ -12,5 +19,3 @@ derby.log settings.xml target test-all.sh -/postgres-down.sh -/postgres-up.sh diff --git a/CHANGES.md b/CHANGES.md index b8fbf715..6cb2c13b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,46 +1,185 @@ -Changes coming in 0.6.2 +Unreleased changes + +* Update to latest parent pom and Clojure 1.11.4 as dep +* Update most testing dependencies (and update a couple of tests to match). +* Drop support for Clojure 1.7 & 1.8. Test against 1.9, 1.10, 1.11, and 1.12. + +Changes in 0.7.12 + +* Make the protocols `ISQLValue`, `ISQLParameter`, and `IResultSetReadColumn` extensible via metadata. + +Changes in 0.7.11 + +* Address edge case in transaction rollback failure [JDBC-179](https://clojure.atlassian.net/browse/JDBC-179). + +Changes in 0.7.10 + +* Use a US-locale `lower-case` function to avoid problems in certain locales (e.g., Turkish). A similar issue has been fixed recently in both HoneySQL and `next.jdbc`. +* Clean up `db-spec` options that are passed to the JDBC connection manager as properties [JDBC-178](https://clojure.atlassian.net/browse/JDBC-178). +* Relax restriction on `create-table-ddl` column specs to allow numbers (as well as keywords and strings) [JDBC-177](https://clojure.atlassian.net/browse/JDBC-177). + +Changes in 0.7.9 + +* Fix behavior of multi-inserts when database does not support generated keys [JDBC-176](https://clojure.atlassian.net/browse/JDBC-176). +* Added _highly experimental_ support for `datafy`/`nav` (in `clojure.java.jdbc.datafy` namespace). This includes a convention-based approach to foreign keys with some assistance from a `:schema` option. This is subject to change and is provided mostly for informational purposes, as an example of the new functionality in Clojure 1.10. This includes a fix for the conventions from [JDBC-175](https://clojure.atlassian.net/browse/JDBC-175). +* Add note about rewriting batched operations to `insert-multi!` for some drivers [JDBC-174](https://clojure.atlassian.net/browse/JDBC-174). +* Support Oracle SID style URLs (`dbtype` can be `oracle:sid` which maps to `oracle:thin` and uses `:` as the separator before the `dbname` value) [JDBC-173](https://clojure.atlassian.net/browse/JDBC-173). + +Changes in 0.7.8 + +* Support multiple JDBC driver class names (MySQL introduced a new driver class name with its 6.x connector) [JDBC-172](https://clojure.atlassian.net/browse/JDBC-172). +* Allow `with-db-connection` and `with-db-metadata` to nest [JDBC-171](https://clojure.atlassian.net/browse/JDBC-171). + +Changes in 0.7.7 + +* Support `:as-arrays?`, `:result-set-fn`, and `:row-fn` in operations that return generated keys as a result set (`execute!`, `insert!`, and `insert-multi!`) [JDBC-169](https://clojure.atlassian.net/browse/JDBC-169). +* `get-connection` provides much better feedback if you accidentally call a function that expects a `db-spec` but pass a `java.sql.Connection` object instead (which is only required for `prepare-statement`). + +Changes in 0.7.6 + +* `execute!` now supports `:return-keys` as a vector of column names, rather than just a simple Boolean value, for drivers that support that [JDBC-166](https://clojure.atlassian.net/browse/JDBC-166). +* Add built-in support for H2 in-memory database (`:dbtype "h2:mem"`). +* Add missing spec for `db-spec` being a `java.net.URI` object. +* Fix `add-connection` handling of string `db-spec` (becomes `:connection-uri`, not `:connection-string`). +* Fix specs for `with-db-*` functions, to support options in the binding form [JDBC-165](https://clojure.atlassian.net/browse/JDBC-165). +* Update tests so they work properly with string `db-spec` test databases. +* Ensure no reflection warnings are present. +* Switched local test infrastructure over to CLI and `deps.edn` (from Leiningen) as an example of multi-version testing without a "build tool". + +Changes in 0.7.5 + +* Add support for `:return-keys` in `execute!` and `:multi?` in `db-do-prepared-return-keys` [JDBC-163](https://clojure.atlassian.net/browse/JDBC-163). + +Changes in 0.7.4 + +* Improved discoverability of other `java.jdbc` documentation [JDBC-160](https://clojure.atlassian.net/browse/JDBC-160). +* Optional specs updated with `:keywordize?` and `:connection-uri` changes from 0.7.2 and 0.7.3 releases. +* Performance improvements, primarily in `query` and `reducible-query`. +* Experimental `:raw?` result set handling in `reducible-query`. +* `modify-connection` is more robust in the face of `null` connections and bad option values. + +Changes in 0.7.3 + +* Added `:keywordize?` option alongside `:identifiers` that defaults to `true` but can be set to `false` to opt-out of converting identifiers to keywords (so column names etc will only be processed by the function passed as `:identifiers`) [JDBC-159](https://clojure.atlassian.net/browse/JDBC-159). +* If an exception occurs during a transaction, and then rollback fails with another exception, both exceptions will now be combined into an `ex-info`. Previously the rollback exception obscured the transaction exception [JDBC-158](https://clojure.atlassian.net/browse/JDBC-158). + +Changes in 0.7.2 + +* `connection-uri` was incorrectly spec'd as a `java.net.URI` but should be `string?` [JDBC-156](https://clojure.atlassian.net/browse/JDBC-156). +* Allow for `:user` and `:password` to be passed with `:connection-uri`, so credentials can be omitted from the connection string. +* Clarified docstring for `get-connection` to show where `:user` and `:password` can be passed. + +Changes in 0.7.1 + +* Connection strings with empty values were not parsed correctly [JDBC-155](https://clojure.atlassian.net/browse/JDBC-155). + +Changes in 0.7.0 + +* `:conditional?` option for `create-table-ddl` and `drop-table-ddl` to provide for existence check (or a function to manipulate the generated DDL). +* Add better support for Oracle connections (default port to `1521`, support `:dbtype "oracle"` -- as `"oracle:thin"` -- and `:dbtype "oracle:oci"`, with `@` instead of `//` before host). + +Changes in 0.7.0-beta5 + +* `get-connection` now accepts an `opts` map with `:auto-commit?` and `:read-only?` options. If present, the appropriate methods will be called on the connection obtained. These options are valid in any function call that may call `get-connection` under the hood. This should allow for streaming results in a query for most databases [JDBC-153](https://clojure.atlassian.net/browse/JDBC-153). +* Additional validation of options is performed in `prepared-statement` to avoid silently ignoring invalid combinations of `:concurrency`, `:cursors`, `:result-type`, and `:return-keys`. + +Changes in 0.7.0-beta4 + +* `opts` are now correctly passed from `reducible-query` to `db-query-with-resultset`. +* Updated the `::query-options` spec to make it clear that `::prepare-options` are also acceptable there. + +Changes in 0.7.0-beta3 + +* Reflection warnings removed in `reducible-result-set` [JDBC-152](https://clojure.atlassian.net/browse/JDBC-152). + +Changes in 0.7.0-beta2 + +* Support for Clojure 1.6.0 and earlier has been dropped -- breaking change. +* Or, put another way, `clojure.java.jdbc` now requires Clojure 1.7 or later! +* All public functions now have specs in the optional `clojure.java.jdbc.spec` namespace (requires `clojure.spec.alpha`). +* `reducible-query` and `reducible-result-set` use `IReduce` and correctly support the no-`init` arity of `reduce` by using the first row of the `ResultSet`, if present, as the (missing) `init` value, and only calling `f` with no arguments if the `ResultSet` is empty. The `init` arity of `reduce` only ever calls `f` with two arguments. + +Changes in 0.7.0-beta1 + +* Support for Clojure 1.4.0 has been dropped -- breaking change. +* Optional spec support now uses `clojure.spec.alpha`. +* `reducible-query` accepts a `db-spec` and a SQL/parameters vector and returns a reducible (`IReduce` on Clojure 1.7 or later; `CollReduce` on Clojure 1.5/1.6): when reduced, it runs the query, obtains a reducible result set, and then reduces that. A reducible query will run the query each time it is reduced. The helper function `reducible-result-set` is public: it accepts a `ResultSet` and produces a reducible that offers a single pass reduce over the rows. Both functions honor `reduced` values to short-circuit the process [JDBC-99](https://clojure.atlassian.net/browse/JDBC-99). + +Changes in 0.7.0-alpha3 + +* `classname` is now accepted with `dbtype` / `dbname` so you can easily specify a JDBC driver class name for a database type that is not known [JDBC-151](https://clojure.atlassian.net/browse/JDBC-151). +* `redshift` has been added as a `dbtype` with `com.amazon.redshift.jdbc.Driver` as the driver name. + +Changes in 0.7.0-alpha2 + +* `pgsql` and the Impossibl PostgresSQL 'NG' driver are now supported (note that `:max-rows` does not work with this driver!); also, providing unknown `dbtype` or `subprotocol` in a `db-spec` should now throw a better exception [JDBC-150](https://clojure.atlassian.net/browse/JDBC-150). +* `quoted` now accepts keywords for database / dialect (`:ansi` (including PostgresSQL), `:mysql`, `:oracle`, `:sqlserver` -- these match the keywords used in HoneySQL which is the recommended third party SQL DSL for java.jdbc) [JDBC-149](https://clojure.atlassian.net/browse/JDBC-149). +* Reorder `get-connection` clauses to make it easier to combine keys in a `db-spec` [JDBC-148](https://clojure.atlassian.net/browse/JDBC-148). +* Force load `DriverManager` before `classForName` call on drivers to avoid potential race condition on initialization [JDBC-145](https://clojure.atlassian.net/browse/JDBC-145). + +Changes in 0.7.0-alpha1 -- potentially breaking changes + +* The signatures of `as-sql-name` and `quoted` have changed slightly: the former no longer has the curried (single argument) version, and the latter no longer has the two argument version. This change came out of a discussion on Slack which indicated curried functions are non-idiomatic. If you relied on the curried version of `as-sql-name`, you will not need to use `partial`. If you relied on the two argument version of `quoted`, you will need to add an extra `( )` for the one argument call. I'd be fairly surprised if anyone is using `as-sql-name` at all since it is really an implementation detail. I'd also be surprised if anyone was using the two argument version of `quoted` since the natural usage is `:entities (quoted [\[ \]])` to create a naming strategy (that provides SQL entity quoting). +* Clarified that `insert-multi!` with a sequence of row maps may be substantially slower than with a sequence of row value vectors (the former performs an insert for each row, the latter performs a single insert for all the data together) [JDBC-147](https://clojure.atlassian.net/browse/JDBC-147). +* All options are passed through all function calls, expanding the range of options you can pass into high-level functions such as `insert!` and `update!` [JDBC-144](https://clojure.atlassian.net/browse/JDBC-144). +* Added `get-isolation-level` to return the current transaction's isolation level, if any [JDBC-141](https://clojure.atlassian.net/browse/JDBC-141). +* Added support for `read-columns` option to allow more flexible customization of reading column values from a result set (particularly in a multi-database application). Also expands `set-parameters` support to options (previously it was just part of the db-spec) [JDBC-137](https://clojure.atlassian.net/browse/JDBC-137). +* Expanded optional `clojure.spec` coverage to almost the whole library API. + +Changes in 0.6.2-alpha3 + +* Fixed bad interaction between `:qualifier` and existing `:identifiers` functionality [JDBC-140](https://clojure.atlassian.net/browse/JDBC-140). +* Updated the README and docstrings to reflect that `:dbtype` is the easiest / preferred way to write `db-spec` maps [JDBC-139](https://clojure.atlassian.net/browse/JDBC-139). +* Fixed postgres / postgresql alias support [JDBC-138](https://clojure.atlassian.net/browse/JDBC-138). + This also adds aliases for mssql (sqlserver), jtds (jtds:sqlserver), oracle (oracle:thin), and hsql (hsqldb). + +Changes in 0.6.2-alpha2 + +* Updates to `clojure.spec` support to work properly with Clojure 1.9.0 Alpha 10. + +Changes in 0.6.2-alpha1 * Experimental support for `clojure.spec` via the new `clojure.java.jdbc.spec` namespace. Requires Clojure 1.9.0 Alpha 8 (or later). -* All options to all functions can now have defaults within the `db-spec` itself [JDBC-136](http://dev.clojure.org/jira/browse/JDBC-136). -* `query` (and by extension `find-by-keys` and `get-by-id`) now support `:explain?` and `:explain-fn` options to help support basic performance analysis [JDBC-135](http://dev.clojure.org/jira/browse/JDBC-135). -* `insert!` and `insert-multi!` now respect `:identifiers` and `:qualifier` because inserting rows on PostgreSQL returns full rows, not just the newly inserted keys [JDBC-134](http://dev.clojure.org/jira/browse/JDBC-134). -* In addition to the `:identifiers` option, you can now use `:qualifier` to specify a namespace qualifier (string) to be used when constructing keywords from SQL column names [JDBC-133](http://dev.clojure.org/jira/browse/JDBC-133). +* All options to all functions can now have defaults within the `db-spec` itself [JDBC-136](https://clojure.atlassian.net/browse/JDBC-136). +* `query` (and by extension `find-by-keys` and `get-by-id`) now support `:explain?` and `:explain-fn` options to help support basic performance analysis [JDBC-135](https://clojure.atlassian.net/browse/JDBC-135). +* `insert!` and `insert-multi!` now respect `:identifiers` and `:qualifier` because inserting rows on PostgreSQL returns full rows, not just the newly inserted keys [JDBC-134](https://clojure.atlassian.net/browse/JDBC-134). +* In addition to the `:identifiers` option, you can now use `:qualifier` to specify a namespace qualifier (string) to be used when constructing keywords from SQL column names [JDBC-133](https://clojure.atlassian.net/browse/JDBC-133). Changes in 0.6.1 -* `insert!` and `insert-multi!` now default `:transaction?` to `true` (as they should have done in 0.6.0!) [JDBC-128](http://dev.clojure.org/jira/browse/JDBC-128). These two functions also have improved docstrings to clarify the difference in behavior between inserting rows as maps compared to inserting rows as a series of column values. -* PostgreSQL support has been improved: java.jdbc is now tested against PostgreSQL locally (as well as SQLite, Apache Derby, HSQLDB, H2, MySQL, MS SQL Server (both MS Type 4 driver and jTDS driver). [JDBC-127](http://dev.clojure.org/jira/browse/JDBC-127) and [JDBC-129](http://dev.clojure.org/jira/browse/JDBC-129). +* `insert!` and `insert-multi!` now default `:transaction?` to `true` (as they should have done in 0.6.0!) [JDBC-128](https://clojure.atlassian.net/browse/JDBC-128). These two functions also have improved docstrings to clarify the difference in behavior between inserting rows as maps compared to inserting rows as a series of column values. +* PostgreSQL support has been improved: java.jdbc is now tested against PostgreSQL locally (as well as SQLite, Apache Derby, HSQLDB, H2, MySQL, MS SQL Server (both MS Type 4 driver and jTDS driver). [JDBC-127](https://clojure.atlassian.net/browse/JDBC-127) and [JDBC-129](https://clojure.atlassian.net/browse/JDBC-129). Changes in 0.6.0 -* `find-by-keys` now correctly handles `nil` values [JDBC-126](http://dev.clojure.org/jira/browse/JDBC-126). +* `find-by-keys` now correctly handles `nil` values [JDBC-126](https://clojure.atlassian.net/browse/JDBC-126). * `find-by-keys` calls `seq` on `:order-by` to treat `[]` as no `ORDER BY` clause. Changes in 0.6.0-rc2 -* `db-query-with-resultset` now accepts an options map and passes it to `prepare-statement` [JDBC-125](http://dev.clojure.org/jira/browse/JDBC-125). +* `db-query-with-resultset` now accepts an options map and passes it to `prepare-statement` [JDBC-125](https://clojure.atlassian.net/browse/JDBC-125). - Passing the `prepare-statement` options map as the first element of the `[sql & params]` vector is no longer supported and will throw an `IllegalArgumentException`. It was always very poorly documented and almost never used, as far as I can tell. * `db-query-with-resultset` no longer requires the `sql-params` argument to be a vector: a sequence is acceptable. This is in line with other functions that accept a sequence. * `db-query-with-resultset` now accepts a bare SQL string or `PreparedStatement` as the `sql-params` argument, when there are no parameters needed. This is in line with other functions that accept SQL or a `PreparedStatement`. -* `query`'s options map now is passed to `db-query-with-resultset` and thus can contain options to be used to construct the `PreparedStatement` [JDBC-125](http://dev.clojure.org/jira/browse/JDBC-125). +* `query`'s options map now is passed to `db-query-with-resultset` and thus can contain options to be used to construct the `PreparedStatement` [JDBC-125](https://clojure.atlassian.net/browse/JDBC-125). * `find-by-keys` now accepts an `:order-by` option that specifies a sequence of orderings; an ordering is either a column (to sort ascending) or a map from column name to direct (`:asc` or `:desc`). Changes in 0.6.0-rc1 * Adds `get-by-id` and `find-by-keys` convenience functions (these were easy to add after the API changes in 0.6.0 and we rely very heavily on them at World Singles so putting them in the core for everyone seemed reasonable). -* REMINDER: ALL DEPRECATED FUNCTIONALITY HAS BEEN REMOVED! [JDBC-118](http://dev.clojure.org/jira/browse/JDBC-118). +* REMINDER: ALL DEPRECATED FUNCTIONALITY HAS BEEN REMOVED! [JDBC-118](https://clojure.atlassian.net/browse/JDBC-118). - See alpha2 / alpha1 below for more details. Changes in 0.6.0-alpha2 -* ALL DEPRECATED FUNCTIONALITY HAS BEEN REMOVED! [JDBC-118](http://dev.clojure.org/jira/browse/JDBC-118). - - This removes deprecated functionality from db-do-commands and db-do-prepared* which should have been removed in Alpha 1. -* Ensures SQL / params are actually vectors prior to destructuring (this addresses an interop edge case from other languages) [JDBC-124](http://dev.clojure.org/jira/browse/JDBC-124). -* Fix typo in `insert-multi!` argument validation exception [JDBC-123](http://dev.clojure.org/jira/browse/JDBC-123). +* ALL DEPRECATED FUNCTIONALITY HAS BEEN REMOVED! [JDBC-118](https://clojure.atlassian.net/browse/JDBC-118). + - This removes deprecated functionality from db-do-commands and `db-do-prepared*` which should have been removed in Alpha 1. +* Ensures SQL / params are actually vectors prior to destructuring (this addresses an interop edge case from other languages) [JDBC-124](https://clojure.atlassian.net/browse/JDBC-124). +* Fix typo in `insert-multi!` argument validation exception [JDBC-123](https://clojure.atlassian.net/browse/JDBC-123). Changes in 0.6.0-alpha1 -* (ALMOST) ALL DEPRECATED FUNCTIONALITY HAS BEEN REMOVED! [JDBC-118](http://dev.clojure.org/jira/browse/JDBC-118). +* (ALMOST) ALL DEPRECATED FUNCTIONALITY HAS BEEN REMOVED! [JDBC-118](https://clojure.atlassian.net/browse/JDBC-118). - See changes described in versions 0.5.5 through 0.5.8 for what was deprecated - Use version 0.5.8 as a bridge to identify any deprecated API calls on which your code relies! - `db-transaction` (deprecated in version 0.3.0) has been removed @@ -48,73 +187,73 @@ Changes in 0.6.0-alpha1 Changes in 0.5.8 -* `db-do-commands` now expects multiple commands to be be wrapped in a vector [JDBC-122](http://dev.clojure.org/jira/browse/JDBC-123). The single command form is unchanged (but may be wrapped in a vector). Calling `db-do-commands` with multiple commands (not wrapped in a single vector) will produce a "DEPRECATED" warning printed to the console. -* `db-do-prepared` and `db-do-prepared-return-keys` now expect to receive a `db-spec`, an optional `transaction?` boolean, a `sql-params` argument, and an optional options map. `sql-params` is a vector containing a SQL string or `PreparedStatement` followed by parameters -- like other APIs in this library. In addition, like the `:multi? true` version of `execute!`, `db-do-prepared` can accept a vector that has parameter groups: multiple vectors containing groups of parameter values [JDBC-122](http://dev.clojure.org/jira/browse/JDBC-123). Calling `db-do-prepared` with unrolled arguments -- the SQL string / statement followed by parameter groups -- is deprecated and will produce "DEPRECATED" warnings printed to the console. +* `db-do-commands` now expects multiple commands to be be wrapped in a vector [JDBC-122](https://clojure.atlassian.net/browse/JDBC-123). The single command form is unchanged (but may be wrapped in a vector). Calling `db-do-commands` with multiple commands (not wrapped in a single vector) will produce a "DEPRECATED" warning printed to the console. +* `db-do-prepared` and `db-do-prepared-return-keys` now expect to receive a `db-spec`, an optional `transaction?` boolean, a `sql-params` argument, and an optional options map. `sql-params` is a vector containing a SQL string or `PreparedStatement` followed by parameters -- like other APIs in this library. In addition, like the `:multi? true` version of `execute!`, `db-do-prepared` can accept a vector that has parameter groups: multiple vectors containing groups of parameter values [JDBC-122](https://clojure.atlassian.net/browse/JDBC-123). Calling `db-do-prepared` with unrolled arguments -- the SQL string / statement followed by parameter groups -- is deprecated and will produce "DEPRECATED" warnings printed to the console. Changes in 0.5.7 -* `(insert! db table [:col] ["val"] {})` syntax, introduced in 0.5.6, threw an exception [JDBC-121](http://dev.clojure.org/jira/browse/JDBC-121). +* `(insert! db table [:col] ["val"] {})` syntax, introduced in 0.5.6, threw an exception [JDBC-121](https://clojure.atlassian.net/browse/JDBC-121). Changes in 0.5.6 -* `create-table-ddl` now expects the column specs to be wrapped in a single vector and no longer needs the `:options` delimiter to specify the options map [JDBC-120](http://dev.clojure.org/jira/browse/JDBC-120). If column specs are not wrapped in a vector, you will get a "DEPRECATED" warning printed to the console. -* `insert!` now supports only single row insertion; multi-row insertion is deprecated. `insert-multi!` has been added for multi-row insertion. `:options` is no longer needed as a delimiter for the options map [JDBC-119](http://dev.clojure.org/jira/browse/JDBC-119). If `insert!` is called with multiple rows, or `:options` is specified, you will get a "DEPRECATED" warning printed to the console. +* `create-table-ddl` now expects the column specs to be wrapped in a single vector and no longer needs the `:options` delimiter to specify the options map [JDBC-120](https://clojure.atlassian.net/browse/JDBC-120). If column specs are not wrapped in a vector, you will get a "DEPRECATED" warning printed to the console. +* `insert!` now supports only single row insertion; multi-row insertion is deprecated. `insert-multi!` has been added for multi-row insertion. `:options` is no longer needed as a delimiter for the options map [JDBC-119](https://clojure.atlassian.net/browse/JDBC-119). If `insert!` is called with multiple rows, or `:options` is specified, you will get a "DEPRECATED" warning printed to the console. * NOTE: all deprecated functionality will go away in version 0.6.0! Changes in 0.5.5 -* Allow options map in all calls that previously took optional keyword arguments [JDBC-117](http://dev.clojure.org/jira/browse/JDBC-117). The unrolled keyword argument forms of call are deprecated -- and print a "DEPRECATED" message to the console! -- and will go away in 0.6.0. +* Allow options map in all calls that previously took optional keyword arguments [JDBC-117](https://clojure.atlassian.net/browse/JDBC-117). The unrolled keyword argument forms of call are deprecated -- and print a "DEPRECATED" message to the console! -- and will go away in 0.6.0. Changes in 0.5.0 -* Allow PreparedStatement in db-do-prepared-return-keys [JDBC-115](http://dev.clojure.org/jira/browse/JDBC-115). -* Remove exception wrapping [JDBC-114](http://dev.clojure.org/jira/browse/JDBC-114). +* Allow PreparedStatement in db-do-prepared-return-keys [JDBC-115](https://clojure.atlassian.net/browse/JDBC-115). +* Remove exception wrapping [JDBC-114](https://clojure.atlassian.net/browse/JDBC-114). * Drop Clojure 1.3 compatibility. Changes in 0.4.2 -* Remove redundant type hints [JDBC-113](http://dev.clojure.org/jira/browse/JDBC-113) - Michael Blume. -* Avoid reflection on `.prepareStatement` [JDBC-112](http://dev.clojure.org/jira/browse/JDBC-112) - Michael Blume. -* Add `metadata-query` macro to make metadata query / results easier to work with for [JDBC-107](http://dev.clojure.org/jira/browse/JDBC-107). -* `prepare-statement` `:return-keys` may now be a vector of (auto-generated) column names to return, in addition to just being truthy or falsey. This allows keys to be returned for more databases. [JDBC-104](http://dev.clojure.org/jira/browse/JDBC-104). -* Officially support H2 (and test against it) to support [JDBC-91](http://dev.clojure.org/jira/browse/JDBC-91) and clarify docstrings to improve debugging driver-specific restrictions on SQL. +* Remove redundant type hints [JDBC-113](https://clojure.atlassian.net/browse/JDBC-113) - Michael Blume. +* Avoid reflection on `.prepareStatement` [JDBC-112](https://clojure.atlassian.net/browse/JDBC-112) - Michael Blume. +* Add `metadata-query` macro to make metadata query / results easier to work with for [JDBC-107](https://clojure.atlassian.net/browse/JDBC-107). +* `prepare-statement` `:return-keys` may now be a vector of (auto-generated) column names to return, in addition to just being truthy or falsey. This allows keys to be returned for more databases. [JDBC-104](https://clojure.atlassian.net/browse/JDBC-104). +* Officially support H2 (and test against it) to support [JDBC-91](https://clojure.atlassian.net/browse/JDBC-91) and clarify docstrings to improve debugging driver-specific restrictions on SQL. Changes in 0.4.0 / 0.4.1 -* `db-do-prepared` now allows `transaction?` to be omitted when a `PreparedStatement` is passed as the second argument [JDBC-111](http://dev.clojure.org/jira/browse/JDBC-111) - Stefan Kamphausen. -* Nested transaction checks isolation level is the same [JDBC-110](http://dev.clojure.org/jira/browse/JDBC-110) - Donald Ball. -* Default PostgreSQL port; Support more dbtype/dbname variants [JDBC-109](http://dev.clojure.org/jira/browse/JDBC-109). +* `db-do-prepared` now allows `transaction?` to be omitted when a `PreparedStatement` is passed as the second argument [JDBC-111](https://clojure.atlassian.net/browse/JDBC-111) - Stefan Kamphausen. +* Nested transaction checks isolation level is the same [JDBC-110](https://clojure.atlassian.net/browse/JDBC-110) - Donald Ball. +* Default PostgreSQL port; Support more dbtype/dbname variants [JDBC-109](https://clojure.atlassian.net/browse/JDBC-109). * Drop Clojure 1.2 compatibility. Changes in 0.3.7 * Bump all driver versions in `project.clj` and re-test. -* Remove duplicate `count` calls in `insert-sql` [JDBC-108](http://dev.clojure.org/jira/browse/JDBC-108) - Earl St Sauver. -* Remove driver versions from README and link to Maven Central [JDBC-106](http://dev.clojure.org/jira/browse/JDBC-106). -* Fix links in CHANGES and README [JDBC-103](http://dev.clojure.org/jira/browse/JDBC-103) - John Walker. +* Remove duplicate `count` calls in `insert-sql` [JDBC-108](https://clojure.atlassian.net/browse/JDBC-108) - Earl St Sauver. +* Remove driver versions from README and link to Maven Central [JDBC-106](https://clojure.atlassian.net/browse/JDBC-106). +* Fix links in CHANGES and README [JDBC-103](https://clojure.atlassian.net/browse/JDBC-103) - John Walker. Changes in 0.3.6 -* Arbitrary values allowed for `:cursors`, `:concurrency`, `:result-type` arguments to `prepare-statement` [JDBC-102](http://dev.clojure.org/jira/browse/JDBC-102). -* Allow `:as-arrays? :cols-as-is` to omit column name uniqueness when returning result sets as arrrays [JDBC-101](http://dev.clojure.org/jira/browse/JDBC-101). -* Add `:timeout` argument to `prepare-statement` [JDBC-100](http://dev.clojure.org/jira/browse/JDBC-100). +* Arbitrary values allowed for `:cursors`, `:concurrency`, `:result-type` arguments to `prepare-statement` [JDBC-102](https://clojure.atlassian.net/browse/JDBC-102). +* Allow `:as-arrays? :cols-as-is` to omit column name uniqueness when returning result sets as arrrays [JDBC-101](https://clojure.atlassian.net/browse/JDBC-101). +* Add `:timeout` argument to `prepare-statement` [JDBC-100](https://clojure.atlassian.net/browse/JDBC-100). Changes in 0.3.5 * Reflection warnings on executeUpdate addressed. -* HSQLDB and SQLite in-memory strings are now accepted [JDBC-94](http://dev.clojure.org/jira/browse/JDBC-94). -* Add support for readonly transactions via :read-only? [JDBC-93](http://dev.clojure.org/jira/browse/JDBC-93). +* HSQLDB and SQLite in-memory strings are now accepted [JDBC-94](https://clojure.atlassian.net/browse/JDBC-94). +* Add support for readonly transactions via :read-only? [JDBC-93](https://clojure.atlassian.net/browse/JDBC-93). Changes in 0.3.4 -* execute! can now accept a PreparedStatement [JDBC-96](http://dev.clojure.org/jira/browse/JDBC-96). -* Support simpler db-spec with :dbtype and :dbname (and optional :host and :port etc) [JDBC-92](http://dev.clojure.org/jire/browse/JDBC-92). -* Support oracle:oci and oracle:thin subprotocols [JDBC-90](http://dev.clojure.org/jira/browse/JDBC-90). +* execute! can now accept a PreparedStatement [JDBC-96](https://clojure.atlassian.net/browse/JDBC-96). +* Support simpler db-spec with :dbtype and :dbname (and optional :host and :port etc) [JDBC-92](https://clojure.atlassian.net/browse/JDBC-92). +* Support oracle:oci and oracle:thin subprotocols [JDBC-90](https://clojure.atlassian.net/browse/JDBC-90). Changes in 0.3.3 -* Prevent exception/crash when query called with bare SQL string [JDBC-89](http://dev.clojure.org/jira/browse/JDBC-89). -* Add :row-fn and :result-set-fn to metadata-result function [JDBC-87](http://dev.clojure.org/jira/browse/JDBC-87). +* Prevent exception/crash when query called with bare SQL string [JDBC-89](https://clojure.atlassian.net/browse/JDBC-89). +* Add :row-fn and :result-set-fn to metadata-result function [JDBC-87](https://clojure.atlassian.net/browse/JDBC-87). * Support key/value configuration from URI (Phil Hagelberg). Changes in 0.3.2 @@ -125,25 +264,25 @@ Changes in 0.3.1 (broken) * Improve docstrings and add :arglists for better auto-generated documentation. * Make insert-sql private - technically a breaking change but it should never have been public: sorry folks! -* Provide better protocol for setting parameters in prepared statements [JDBC-86](http://dev.clojure.org/jira/browse/JDBC-86). -* Fix parens in two deprecated tests [JDBC-85](http://dev.clojure.org/jira/browse/JDBC-85). +* Provide better protocol for setting parameters in prepared statements [JDBC-86](https://clojure.atlassian.net/browse/JDBC-86). +* Fix parens in two deprecated tests [JDBC-85](https://clojure.atlassian.net/browse/JDBC-85). * Made create-table-ddl less aggressive about applying as-sql-name so only first name in a column spec is affected. Changes in 0.3.0 -* Ensure canonical Boolean to workaround strange behavior in some JDBC drivers [JDBC-84](http://dev.clojure.org/jira/browse/JDBC-84). -* Rename recently introduced test to ensure unique names [JDBC-83](http://dev.clojure.org/jira/browse/JDBC-83). -* Rename unused arguments in protocol implementation to support Android [JDBC-82](http://dev.clojure.org/jira/browse/JDBC-82). -* Correctly handle empty param group sequence in execute! (which only seemed to affect SQLite) [JDBC-65](http://dev.clojure.org/jira/browse/JDBC-65). +* Ensure canonical Boolean to workaround strange behavior in some JDBC drivers [JDBC-84](https://clojure.atlassian.net/browse/JDBC-84). +* Rename recently introduced test to ensure unique names [JDBC-83](https://clojure.atlassian.net/browse/JDBC-83). +* Rename unused arguments in protocol implementation to support Android [JDBC-82](https://clojure.atlassian.net/browse/JDBC-82). +* Correctly handle empty param group sequence in execute! (which only seemed to affect SQLite) [JDBC-65](https://clojure.atlassian.net/browse/JDBC-65). Changes in 0.3.0-rc1 -* Deprecate db-transaction (new in 0.3.0) in favor of with-db-transaction [JDBC-81](http://dev.clojure.org/jira/browse/JDBC-81). -* Add with-db-metadata macro and metadata-result function to make it easier to work with SQL metadata [JDBC-80](http://dev.clojure.org/jira/browse/JDBC-80). -* Add with-db-connection macro to make it easier to run groups of operations against a single open connection [JDBC-79](http://dev.clojure.org/jira/browse/JDBC-79). -* Add ISQLValue protocol to make it easier to support custom SQL types for parameters in SQL statements [JDBC-77](http://dev.clojure.org/jira/browse/JDBC-77). -* Add support for :isolation in with-db-transaction [JDBC-75](http://dev.clojure.org/jira/browse/JDBC-75). -* Add :user as an alias for :username for DataSource connections [JDBC-74](http://dev.clojure.org/jira/browse/JDBC-74). +* Deprecate db-transaction (new in 0.3.0) in favor of with-db-transaction [JDBC-81](https://clojure.atlassian.net/browse/JDBC-81). +* Add with-db-metadata macro and metadata-result function to make it easier to work with SQL metadata [JDBC-80](https://clojure.atlassian.net/browse/JDBC-80). +* Add with-db-connection macro to make it easier to run groups of operations against a single open connection [JDBC-79](https://clojure.atlassian.net/browse/JDBC-79). +* Add ISQLValue protocol to make it easier to support custom SQL types for parameters in SQL statements [JDBC-77](https://clojure.atlassian.net/browse/JDBC-77). +* Add support for :isolation in with-db-transaction [JDBC-75](https://clojure.atlassian.net/browse/JDBC-75). +* Add :user as an alias for :username for DataSource connections [JDBC-74](https://clojure.atlassian.net/browse/JDBC-74). Changes in 0.3.0-beta2 @@ -152,48 +291,48 @@ Changes in 0.3.0-beta2 Changes in 0.3.0-beta1 -* query as-arrays? now allows you to leverage lazy result fetching [JDBC-72](http://dev.clojure.org/jira/browse/JDBC-72). +* query as-arrays? now allows you to leverage lazy result fetching [JDBC-72](https://clojure.atlassian.net/browse/JDBC-72). * "h2" is recognized as a protocol shorthand for org.h2.Driver -* Tests no longer use :1 literal [JDBC-71](http://dev.clojure.org/jira/browse/JDBC-71). -* Conditional use of javax.naming.InitialContext so it can be compiled on Android [JDBC-69](http://dev.clojure.org/jira/browse/JDBC-69). -* New db-query-with-resultset function replaces private db-with-query-results* and processes a raw ResultSet object [JDBC-63](http://dev.clojure.org/jira/browse/JDBC-63). -* Allow :set-parameters in db-spec to override set-parameters internal function to allow per-DB special handling of SQL parameters values (such as null for Teradata) [JDBC-40](http://dev.clojure.org/jira/browse/JDBC-40). +* Tests no longer use :1 literal [JDBC-71](https://clojure.atlassian.net/browse/JDBC-71). +* Conditional use of javax.naming.InitialContext so it can be compiled on Android [JDBC-69](https://clojure.atlassian.net/browse/JDBC-69). +* New db-query-with-resultset function replaces private `db-with-query-results*` and processes a raw ResultSet object [JDBC-63](https://clojure.atlassian.net/browse/JDBC-63). +* Allow :set-parameters in db-spec to override set-parameters internal function to allow per-DB special handling of SQL parameters values (such as null for Teradata) [JDBC-40](https://clojure.atlassian.net/browse/JDBC-40). Changes in 0.3.0-alpha5 -* DDL now supports entities naming strategy [JDBC-53](http://dev.clojure.org/jira/browse/JDBC-53). +* DDL now supports entities naming strategy [JDBC-53](https://clojure.atlassian.net/browse/JDBC-53). * Attempt to address potential memory leaks due to closures - see [Christophe Grand's blog post on Macros, closures and unexpected object retention](http://clj-me.cgrand.net/2013/09/11/macros-closures-and-unexpected-object-retention/). * Documentation has moved to [Using java.jdbc on Clojure-Doc.org](http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html) * Added Leiningen support for easier development/testing (Maven is still the primary build tool). -* Added create-index / drop-index DDL [JDBC-62](http://dev.clojure.org/jira/browse/JDBC-62) - moquist -* Make transaction? boolean optional in various db-do-* functions +* Added create-index / drop-index DDL [JDBC-62](https://clojure.atlassian.net/browse/JDBC-62) - moquist +* Make transaction? boolean optional in various `db-do-*` functions * Create clojure.java.jdbc.ddl namespace * Add create-table, drop-table, create-index and drop-index * Deprecate create-table, create-table-ddl and drop-table in main namespace * Update README to clarify PostgreSQL instructions. -* Fix test suite for PostgreSQL [JDBC-59](http://dev.clojure.org/jira/browser/JDBC-59) -* Improve hooks for Oracle data type handling [JDBC-57](http://dev.clojure.org/jira/browser/JDBC-57) -* Fix reflection warnings [JDBC-55](http://dev.clojure.org/jira/browser/JDBC-55) +* Fix test suite for PostgreSQL [JDBC-59](https://clojure.atlassian.net/browser/JDBC-59) +* Improve hooks for Oracle data type handling [JDBC-57](https://clojure.atlassian.net/browser/JDBC-57) +* Fix reflection warnings [JDBC-55](https://clojure.atlassian.net/browser/JDBC-55) -* DDL now supports entities naming strategy [JDBC-53](http://dev.clojure.org/jira/browse/JDBC-53). +* DDL now supports entities naming strategy [JDBC-53](https://clojure.atlassian.net/browse/JDBC-53). * Attempt to address potential memory leaks due to closures - see [Christophe Grand's blog post on Macros, closures and unexpected object retention](http://clj-me.cgrand.net/2013/09/11/macros-closures-and-unexpected-object-retention/). * Documentation has moved to [Using java.jdbc on Clojure-Doc.org](http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html) * Added Leiningen support for easier development/testing (Maven is still the primary build tool). -* Added create-index / drop-index DDL [JDBC-62](http://dev.clojure.org/jira/browse/JDBC-62) - moquist -* Make transaction? boolean optional in various db-do-* functions - * It will ultimately change to a function argument I think when [JDBC-37](http://dev.clojure.org/jira/browser/JDBC-37) is dealt with +* Added create-index / drop-index DDL [JDBC-62](https://clojure.atlassian.net/browse/JDBC-62) - moquist +* Make transaction? boolean optional in various `db-do-*` functions + * It will ultimately change to a function argument I think when [JDBC-37](https://clojure.atlassian.net/browser/JDBC-37) is dealt with * Create clojure.java.jdbc.ddl namespace * Add create-table and drop-table * Deprecate create-table, create-table-ddl and drop-table in main namespace * More DDL is coming soon * Update README to clarify PostgreSQL instructions. -* Fix test suite for PostgreSQL [JDBC-59](http://dev.clojure.org/jira/browser/JDBC-59) -* Improve hooks for Oracle data type handling [JDBC-57](http://dev.clojure.org/jira/browser/JDBC-57) -* Fix reflection warnings [JDBC-55](http://dev.clojure.org/jira/browser/JDBC-55) +* Fix test suite for PostgreSQL [JDBC-59](https://clojure.atlassian.net/browser/JDBC-59) +* Improve hooks for Oracle data type handling [JDBC-57](https://clojure.atlassian.net/browser/JDBC-57) +* Fix reflection warnings [JDBC-55](https://clojure.atlassian.net/browser/JDBC-55) Changes in 0.3.0-alpha4 -* Fix connection leaks [JDBC-54](http://dev.clojure.org/jira/browser/JDBC-54) +* Fix connection leaks [JDBC-54](https://clojure.atlassian.net/browser/JDBC-54) * Allow order-by to accept empty sequence (and return empty string) Changes in 0.3.0-alpha3 @@ -202,10 +341,10 @@ Changes in 0.3.0-alpha3 Changes in 0.3.0-alpha2 -* Address [JDBC-51](http://dev.clojure.org/jira/browse/JDBC-51) by declaring get-connection returns java.sql.Connection -* Add IResultSetReadColumn protocol extension point for custom read conversions [JDBC-46](http://dev.clojure.org/jira/browse/JDBC-46) -* Add :multi? to execute! so it can be used for repeated operations [JDBC-52](http://dev.clojure.org/jira/browse/JDBC-52) -* Reverted specialized handling of NULL values (reopens [JDBC-40](http://dev.clojure.org/jira/browse/JDBC-40)) +* Address [JDBC-51](https://clojure.atlassian.net/browse/JDBC-51) by declaring get-connection returns java.sql.Connection +* Add IResultSetReadColumn protocol extension point for custom read conversions [JDBC-46](https://clojure.atlassian.net/browse/JDBC-46) +* Add :multi? to execute! so it can be used for repeated operations [JDBC-52](https://clojure.atlassian.net/browse/JDBC-52) +* Reverted specialized handling of NULL values (reopens [JDBC-40](https://clojure.atlassian.net/browse/JDBC-40)) * Rename :as-arrays to :as-arrays? since it is boolean * Add curried version of clojure.java.jdbc.sql/as-quoted-str * Officially deprecate resultset-seq @@ -215,7 +354,7 @@ Changes in 0.3.0-alpha1 Major overhaul of the API and deprecation of most of the old API! * Add insert!, query, update!, delete! and execute! high-level API - [JDBC-20](http://dev.clojure.org/jira/browse/JDBC-20) + [JDBC-20](https://clojure.atlassian.net/browse/JDBC-20) * Add optional SQL-generating DSL in clojure.java.jdbc.sql (implied by JDBC-20) * Add db- prefixed versions of low-level API * Add db-transaction macro: @@ -227,16 +366,16 @@ Major overhaul of the API and deprecation of most of the old API! * Add result-set-seq as replacement for resultset-seq (which will be deprecated) * Transaction now correctly rollback on non-Exception Throwables - [JDBC-43](http://dev.clojure.org/jira/browse/JDBC-43) + [JDBC-43](https://clojure.atlassian.net/browse/JDBC-43) * Rewrite old API functions in terms of new API, and deprecate old API - [JDBC-43](http://dev.clojure.org/jira/browse/JDBC-43) + [JDBC-43](https://clojure.atlassian.net/browse/JDBC-43) * Add :as-arrays to query / result-set-seq - [JDBC-41](http://dev.clojure.org/jira/browse/JDBC-41) -* Better handling of NULL values [JDBC-40](http://dev.clojure.org/jira/browse/JDBC-40) - and [JDBC-18](http://dev.clojure.org/jira/browse/JDBC-18) + [JDBC-41](https://clojure.atlassian.net/browse/JDBC-41) +* Better handling of NULL values [JDBC-40](https://clojure.atlassian.net/browse/JDBC-40) + and [JDBC-18](https://clojure.atlassian.net/browse/JDBC-18) Note: JDBC-40 has been reverted in 0.3.0-alpha2 because it introduced regressions for PostgreSQL * db-do-commands allows you to execute SQL without a transaction wrapping it - [JDBC-38](http://dev.clojure.org/jira/browse/JDBC-38) + [JDBC-38](https://clojure.atlassian.net/browse/JDBC-38) * Remove reflection warning from execute-batch * Add notes to README about 3rd party database driver dependencies * Add optional :identifiers argument to resultset-seq so you can explicitly pass in the naming strategy @@ -244,18 +383,18 @@ Major overhaul of the API and deprecation of most of the old API! Changes in 0.2.3: * as-str now treats a.b as two identifiers separated by . so quoting produces [a].[b] instead of [a.b] -* Add :connection-uri option [JDBC-34](http://dev.clojure.org/jira/browse/JDBC-34) +* Add :connection-uri option [JDBC-34](https://clojure.atlassian.net/browse/JDBC-34) Changes in 0.2.2: -* Handle Oracle unknown row count affected [JDBC-33](http://dev.clojure.org/jira/browse/JDBC-33) -* Handle jdbc: prefix in string db-specs [JDBC-32](http://dev.clojure.org/jira/browse/JDBC-32) -* Handle empty columns in make column unique (Juergen Hoetzel) [JDBC-31](http://dev.clojure.org/jira/browse/JDBC-31) +* Handle Oracle unknown row count affected [JDBC-33](https://clojure.atlassian.net/browse/JDBC-33) +* Handle jdbc: prefix in string db-specs [JDBC-32](https://clojure.atlassian.net/browse/JDBC-32) +* Handle empty columns in make column unique (Juergen Hoetzel) [JDBC-31](https://clojure.atlassian.net/browse/JDBC-31) Changes in 0.2.1: -* Result set performance enhancement (Juergen Hoetzel) [JDBC-29](http://dev.clojure.org/jira/browse/JDBC-29) -* Make do-prepared-return-keys (for Korma team) [JDBC-30](http://dev.clojure.org/jira/browse/JDBC-30) +* Result set performance enhancement (Juergen Hoetzel) [JDBC-29](https://clojure.atlassian.net/browse/JDBC-29) +* Make do-prepared-return-keys (for Korma team) [JDBC-30](https://clojure.atlassian.net/browse/JDBC-30) Changes in 0.2.0: @@ -329,7 +468,7 @@ Changes in 0.0.4: * 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 +* Refactor `do-prepared*`, separating out return keys logic and parameter setting logic - in preparation for exposing more hooks in PreparedStatement creation / manipulation Changes in 0.0.3: @@ -342,9 +481,9 @@ Changes in 0.0.2: Changes in 0.0.1 (compared to clojure.contrib.sql): -* Exposed print-... functions for exception printing; no longer writes exceptions to *out* +* 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 +* Add support for naming and quoting strategies - see https://clojure.github.io/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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7800bfb8..d1017074 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,12 +3,10 @@ This is a [Clojure contrib] project. Under the Clojure contrib [guidelines], this project cannot accept pull requests. All patches must be submitted via [JIRA]. -See [Contributing] and the [FAQ] on the Clojure development [wiki] for +See [Contributing] on the Clojure website for more information on how to contribute. -[Clojure contrib]: http://dev.clojure.org/display/doc/Clojure+Contrib -[Contributing]: http://dev.clojure.org/display/community/Contributing -[FAQ]: http://dev.clojure.org/display/community/Contributing+FAQ -[JIRA]: http://dev.clojure.org/jira/browse/JDBC -[guidelines]: http://dev.clojure.org/display/community/Guidelines+for+Clojure+Contrib+committers -[wiki]: http://dev.clojure.org/ +[Clojure contrib]: https://clojure.org/community/contrib_libs +[Contributing]: https://clojure.org/community/contributing +[JIRA]: http://clojure.atlassian.net/browse/JDBC +[guidelines]: https://clojure.org/community/contrib_howto diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..e246f6a2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,205 @@ +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation + distributed under this Agreement, and +b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + + where such changes and/or additions to the Program originate from and are + distributed by that particular Contributor. A Contribution 'originates' + from a Contributor if it was added to the Program by such Contributor + itself or anyone acting on such Contributor's behalf. Contributions do not + include additions to the Program which: (i) are separate modules of + software distributed in conjunction with the Program under their own + license agreement, and (ii) are not derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when +combined with the Program. + +"Program" means the Contributions distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + a) Subject to the terms of this Agreement, each Contributor hereby grants + Recipient a non-exclusive, worldwide, royalty-free copyright license to + reproduce, prepare derivative works of, publicly display, publicly + perform, distribute and sublicense the Contribution of such Contributor, + if any, and such derivative works, in source code and object code form. + b) Subject to the terms of this Agreement, each Contributor hereby grants + Recipient a non-exclusive, worldwide, royalty-free patent license under + Licensed Patents to make, use, sell, offer to sell, import and otherwise + transfer the Contribution of such Contributor, if any, in source code and + object code form. This patent license shall apply to the combination of + the Contribution and the Program if, at the time the Contribution is + added by the Contributor, such addition of the Contribution causes such + combination to be covered by the Licensed Patents. The patent license + shall not apply to any other combinations which include the Contribution. + No hardware per se is licensed hereunder. + c) Recipient understands that although each Contributor grants the licenses + to its Contributions set forth herein, no assurances are provided by any + Contributor that the Program does not infringe the patent or other + intellectual property rights of any other entity. Each Contributor + disclaims any liability to Recipient for claims brought by any other + entity based on infringement of intellectual property rights or + otherwise. As a condition to exercising the rights and licenses granted + hereunder, each Recipient hereby assumes sole responsibility to secure + any other intellectual property rights needed, if any. For example, if a + third party patent license is required to allow Recipient to distribute + the Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + d) Each Contributor represents that to its knowledge it has sufficient + copyright rights in its Contribution, if any, to grant the copyright + license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under +its own license agreement, provided that: + + a) it complies with the terms and conditions of this Agreement; and + b) its license agreement: + i) effectively disclaims on behalf of all Contributors all warranties + and conditions, express and implied, including warranties or + conditions of title and non-infringement, and implied warranties or + conditions of merchantability and fitness for a particular purpose; + ii) effectively excludes on behalf of all Contributors all liability for + damages, including direct, indirect, special, incidental and + consequential damages, such as lost profits; + iii) states that any provisions which differ from this Agreement are + offered by that Contributor alone and not by any other party; and + iv) states that source code for the Program is available from such + Contributor, and informs licensees how to obtain it in a reasonable + manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + + a) it must be made available under this Agreement; and + b) a copy of this Agreement must be included with each copy of the Program. + Contributors may not remove or alter any copyright notices contained + within the Program. + +Each Contributor must identify itself as the originator of its Contribution, +if +any, in a manner that reasonably allows subsequent Recipients to identify the +originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, +if a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits and +other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such Commercial +Contributor in connection with its distribution of the Program in a commercial +product offering. The obligations in this section do not apply to any claims +or Losses relating to any actual or alleged intellectual property +infringement. In order to qualify, an Indemnified Contributor must: +a) promptly notify the Commercial Contributor in writing of such claim, and +b) allow the Commercial Contributor to control, and cooperate with the +Commercial Contributor in, the defense and any related settlement +negotiations. The Indemnified Contributor may participate in any such claim at +its own expense. + +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If +that Commercial Contributor then makes performance claims, or offers +warranties related to Product X, those performance claims and warranties are +such Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using +and distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to the +risks and costs of program errors, compliance with applicable laws, damage to +or loss of data, programs or equipment, and unavailability or interruption of +operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION +LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of the +remainder of the terms of this Agreement, and without further action by the +parties hereto, such provision shall be reformed to the minimum extent +necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Program itself +(excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted +under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue +and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to +time. No one other than the Agreement Steward has the right to modify this +Agreement. The Eclipse Foundation is the initial Agreement Steward. The +Eclipse Foundation may assign the responsibility to serve as the Agreement +Steward to a suitable separate entity. Each new version of the Agreement will +be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the +Agreement under which it was received. In addition, after a new version of the +Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly +stated in Sections 2(a) and 2(b) above, Recipient receives no rights or +licenses to the intellectual property of any Contributor under this Agreement, +whether expressly, by implication, estoppel or otherwise. All rights in the +Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in +any resulting litigation. + + diff --git a/README.md b/README.md index 8e78e622..5c4dac6f 100644 --- a/README.md +++ b/README.md @@ -1,68 +1,104 @@ clojure.java.jdbc ======================================== -A low-level Clojure wrapper for JDBC-based access to databases. +A low-level Clojure wrapper for JDBC-based access to databases. This project is "Inactive". It has effectively been superseded by [seancorfield/next.jdbc](https://github.com/seancorfield/next-jdbc). -For DSLs that are compatible with this library, consider: - -* [HoneySQL](https://github.com/jkk/honeysql) -* [SQLingvo](https://github.com/r0man/sqlingvo) -* [Korma](http://sqlkorma.com) +For higher level DSLs and migration libraries that are compatible, see the [documentation](https://clojure-doc.org/articles/ecosystem/java_jdbc/home). Formerly known as `clojure.contrib.sql`. -Additional documentation can be found in the [java.jdbc section of clojure-doc.org](http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html) and there is a dedicated [java.jdbc mailing list](https://groups.google.com/forum/#!forum/clojure-java-jdbc) +This library is mature and stable. It is widely used and its use is described in many books and tutorials. It will only get critical bug fixes (e.g., security). Based on my experience using and maintaining this library, I've created a faster, more modern JDBC wrapper called [next.jdbc](https://github.com/seancorfield/next-jdbc). I consider it to be the "next generation" of `clojure.java.jdbc` but it exposes a different API -- a better API, I think. -Releases and Dependency Information +Documentation +======================================== +* [API Reference](https://clojure.github.io/java.jdbc/) (Autogenerated) +* [Overview](https://clojure-doc.org/articles/ecosystem/java_jdbc/home) +* [Manipulating Data with SQL](https://clojure-doc.org/articles/ecosystem/java_jdbc/using_sql) +* [How to Reuse Database Connections](https://clojure-doc.org/articles/ecosystem/java_jdbc/reusing_connections) +* [Using DDL and Metadata](https://clojure-doc.org/articles/ecosystem/java_jdbc/using_ddl) + +Support ======================================== +* [Mailing List](https://groups.google.com/forum/#!forum/clojure-java-jdbc) +* #sql on [Clojurians Slack](http://clojurians.net/) -Latest stable release: 0.6.1 +Releases and Dependency Information +======================================== -* [All Released Versions](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22java.jdbc%22) +Latest stable release: 0.7.12 -- requires Clojure 1.7 or later! +* [All Released Versions](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22java.jdbc%22) * [Development Snapshot Versions](https://oss.sonatype.org/index.html#nexus-search;gav~org.clojure~java.jdbc~~~) +[CLI/`deps.edn`](https://clojure.org/reference/deps_and_cli) dependency information: +```clojure +org.clojure/java.jdbc {:mvn/version "0.7.12"} +``` [Leiningen](https://github.com/technomancy/leiningen) dependency information: ```clojure -[org.clojure/java.jdbc "0.6.1"] +[org.clojure/java.jdbc "0.7.12"] ``` -[Maven](http://maven.apache.org/) dependency information: +[Maven](https://maven.apache.org/) dependency information: ```xml org.clojure java.jdbc - 0.6.1 + 0.7.12 ``` +_Note: Earlier versions of Clojure are supported by older versions of `clojure.java.jdbc`: e.g., version 0.6.1 supports Clojure 1.4 and later._ + You will also need to add dependencies for the JDBC driver you intend to use. Here are links (to Maven Central) for each of the common database drivers that clojure.java.jdbc is known to be used with: -* [Apache Derby](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.derby%22%20AND%20a%3A%22derby%22) -* [HSQLDB](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22hsqldb%22%20AND%20a%3A%22hsqldb%22) -* [Microsoft SQL Server jTDS](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22net.sourceforge.jtds%22%20AND%20a%3A%22jtds%22) -* [MySQL](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22mysql%22%20AND%20a%3A%22mysql-connector-java%22) -* [PostgreSQL](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.postgresql%22%20AND%20a%3A%22postgresql%22) -* [SQLite](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.xerial%22%20AND%20a%3A%22sqlite-jdbc%22) +* [Apache Derby](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.derby%22%20AND%20a%3A%22derby%22) +* [H2](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.h2database%22%20AND%20a%3A%22h2%22) +* [HSQLDB](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22hsqldb%22%20AND%20a%3A%22hsqldb%22) +* [Microsoft SQL Server jTDS](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22net.sourceforge.jtds%22%20AND%20a%3A%22jtds%22) +* [Microsoft SQL Server -- Official MS Version](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.sqlserver%22%20AND%20a%3A%22mssql-jdbc%22) +* [MySQL](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22mysql%22%20AND%20a%3A%22mysql-connector-java%22) +* [PostgreSQL](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.postgresql%22%20AND%20a%3A%22postgresql%22) +* [SQLite](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.xerial%22%20AND%20a%3A%22sqlite-jdbc%22) -clojure.java.jdbc is also tested against Microsoft's own JDBC4 Driver 4.0 but that -has to be [downloaded manually](https://www.microsoft.com/en-us/download/details.aspx?id=11774) and placed in a Maven repository accessible to your system. For testing, it was installed locally as: -```clojure -;; Microsoft SQL Server JDBC4 Driver 4.0 -[sqljdbc4/sqljdbc4 "4.0"] -``` +Note: different versions of various database drivers have different Java/JVM version requirements. In particular, recent versions of Apache Derby require at least Java 8 and recent versions of H2 require at least Java 7. Clojure's Continuous Integration system uses older versions so tests can be run on Java 6 (see `pom.xml`); local testing is done with more recent versions on Java 8. Example Usage ======================================== ```clojure (require '[clojure.java.jdbc :as j]) -(def mysql-db {:subprotocol "mysql" - :subname "//127.0.0.1:3306/clojure_test" +;; there are many ways to write a db-spec but the easiest way is to +;; use :dbtype and then provide the :dbname and any of :user, :password, +;; :host, :port, and other options as needed: +(def mysql-db {:dbtype "mysql" + :dbname "clojure_test" :user "clojure_test" :password "clojure_test"}) -(j/insert! mysql-db :fruit - {:name "Apple" :appearance "rosy" :cost 24} - {:name "Orange" :appearance "round" :cost 49}) +(def pg-db {:dbtype "postgresql" + :dbname "mypgdatabase" + :host "mydb.server.com" + :user "myuser" + :password "secret" + :ssl true + :sslfactory "org.postgresql.ssl.NonValidatingFactory"}) + +;; if the dbtype is not known to clojure.java.jdbc, or you want to override the +;; default choice of JDBC driver class name, you can provide :classname and the +;; name of the class to use: + +(def redshift42 {:dbtype "redshift" + :dbname "myredstore" + :classname "com.amazon.redshift.jdbc42.Driver" + ...}) + +;; you can also specify a full connection string if you'd prefer: +(def pg-uri + {:connection-uri (str "postgresql://myuser:secret@mydb.server.com:5432/mypgdatabase" + "?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory")}) + +(j/insert-multi! mysql-db :fruit + [{:name "Apple" :appearance "rosy" :cost 24} + {:name "Orange" :appearance "round" :cost 49}]) ;; ({:generated_key 1} {:generated_key 2}) (j/query mysql-db @@ -70,18 +106,14 @@ Example Usage {:row-fn :cost}) ;; (24) ``` -For more detail see the [generated documentation on github](http://clojure.github.com/java.jdbc/). +For more detail see the [API reference](https://clojure.github.io/java.jdbc/) or [documentation](https://clojure-doc.org/articles/ecosystem/java_jdbc/home). Developer Information ======================================== * [GitHub project](https://github.com/clojure/java.jdbc) - -* [Bug Tracker](http://dev.clojure.org/jira/browse/JDBC) - -* [Continuous Integration](http://build.clojure.org/job/java.jdbc/) - -* [Compatibility Test Matrix](http://build.clojure.org/job/java.jdbc-test-matrix/) +* [Bug Tracker](https://clojure.atlassian.net/browse/JDBC) +* [Continuous Integration](https://github.com/clojure/java.jdbc/actions/workflows/test.yml) * Testing: * Currently by default tests run only against Derby and HSQLDB, the in-process databases. @@ -99,94 +131,218 @@ Developer Information * Then run the tests with the TEST_DBS environment variable: - $ TEST_DBS=mysql,postgres mvn test + $ TEST_DBS="mysql postgres" mvn test + +* Also see the `run-tests.sh` shell script which uses the `clj` CLI and `deps.edn` for multi-version testing! Change Log ==================== +* Unreleased changes + * Update to latest parent pom and Clojure 1.11.4 as dep + * Update most testing dependencies (and update a couple of tests to match). + * Drop support for Clojure 1.7 & 1.8. Test against 1.9, 1.10, 1.11, and 1.12. + +* Release 0.7.12 on 2021-02-01 + * Make the protocols `ISQLValue`, `ISQLParameter`, and `IResultSetReadColumn` extensible via metadata. + +* Release 0.7.11 on 2019-12-24 + * Address edge case in transaction rollback failure [JDBC-179](https://clojure.atlassian.net/browse/JDBC-179). + +* Release 0.7.10 on 2019-08-24 + * Use a US-locale `lower-case` function to avoid problems in certain locales (e.g., Turkish). A similar issue has been fixed recently in both HoneySQL and `next.jdbc`. + * Clean up `db-spec` options that are passed to the JDBC connection manager as properties [JDBC-178](https://clojure.atlassian.net/browse/JDBC-178). + * Relax restriction on `create-table-ddl` column specs to allow numbers (as well as keywords and strings) [JDBC-177](https://clojure.atlassian.net/browse/JDBC-177). + +* Release 0.7.9 on 2019-02-21 + * Fix behavior of multi-inserts when database does not support generated keys [JDBC-176](https://clojure.atlassian.net/browse/JDBC-176). + * Added _highly experimental_ support for `datafy`/`nav` (in `clojure.java.jdbc.datafy` namespace). This includes a convention-based approach to foreign keys with some assistance from a `:schema` option. This is subject to change and is provided mostly for informational purposes, as an example of the new functionality in Clojure 1.10. This includes a fix for the conventions from [JDBC-175](https://clojure.atlassian.net/browse/JDBC-175). + * Add note about rewriting batched operations to `insert-multi!` for some drivers [JDBC-174](https://clojure.atlassian.net/browse/JDBC-174). + * Support Oracle SID style URLs (`dbtype` can be `oracle:sid` which maps to `oracle:thin` and uses `:` as the separator before the `dbname` value) [JDBC-173](https://clojure.atlassian.net/browse/JDBC-173). + +* Release 0.7.8 on 2018-08-13 + * Support multiple JDBC driver class names (MySQL introduced a new driver class name with its 6.x connector) [JDBC-172](https://clojure.atlassian.net/browse/JDBC-172). + * Allow `with-db-connection` and `with-db-metadata` to nest [JDBC-171](https://clojure.atlassian.net/browse/JDBC-171). + +* Release 0.7.7 on 2018-06-23 + * Support `:as-arrays?`, `:result-set-fn`, and `:row-fn` in operations that return generated keys as a result set (`execute!`, `insert!`, and `insert-multi!`) [JDBC-169](https://clojure.atlassian.net/browse/JDBC-169). + * `get-connection` provides much better feedback if you accidentally call a function that expects a `db-spec` but pass a `java.sql.Connection` object instead (which is only required for `prepare-statement`). + +* Release 0.7.6 on 2018-04-24 + * `execute!` now supports `:return-keys` as a vector of column names, rather than just a simple Boolean value, for drivers that support that [JDBC-166](https://clojure.atlassian.net/browse/JDBC-166). + * Add built-in support for H2 in-memory database (`:dbtype "h2:mem"`). + * Add missing spec for `db-spec` being a `java.net.URI` object. + * Fix `add-connection` handling of string `db-spec` (becomes `:connection-uri`, not `:connection-string`). + * Fix specs for `with-db-*` functions, to support options in the binding form [JDBC-165](https://clojure.atlassian.net/browse/JDBC-165). + * Update tests so they work properly with string `db-spec` test databases. + * Ensure no reflection warnings are present. + * Switched local test infrastructure over to CLI and `deps.edn` (from Leiningen) as an example of multi-version testing without a "build tool". + +* Release 0.7.5 on 2017-12-29 + * Add support for `:return-keys` in `execute!` and `:multi?` in `db-do-prepared-return-keys` [JDBC-163](https://clojure.atlassian.net/browse/JDBC-163). + +* Release 0.7.4 on 2017-12-14 + * Improved discoverability of other `java.jdbc` documentation [JDBC-160](https://clojure.atlassian.net/browse/JDBC-160). + * Optional specs updated with `:keywordize?` and `:connection-uri` changes from 0.7.2 and 0.7.3 releases. + * Performance improvements, primarily in `query` and `reducible-query`. + * Experimental `:raw?` result set handling in `reducible-query`. + * `modify-connection` is more robust in the face of `null` connections and bad option values. + +* Release 0.7.3 on 2017-10-05 + * Added `:keywordize?` option alongside `:identifiers` that defaults to `true` but can be set to `false` to opt-out of converting identifiers to keywords (so column names etc will only be processed by the function passed as `:identifiers`) [JDBC-159](https://clojure.atlassian.net/browse/JDBC-159). + * If an exception occurs during a transaction, and then rollback fails with another exception, both exceptions will now be combined into an `ex-info`. Previously the rollback exception obscured the transaction exception [JDBC-158](https://clojure.atlassian.net/browse/JDBC-158). + +* Release 0.7.2 on 2017-10-02 + * `connection-uri` was incorrectly spec'd as a `java.net.URI` but should be `string?` [JDBC-156](https://clojure.atlassian.net/browse/JDBC-156). + * Allow for `:user` and `:password` to be passed with `:connection-uri`, so credentials can be omitted from the connection string. + * Clarified docstring for `get-connection` to show where `:user` and `:password` can be passed. + +* Release 0.7.1 on 2017-08-30 + * Connection strings with empty values were not parsed correctly [JDBC-155](https://clojure.atlassian.net/browse/JDBC-155). + +* Release 0.7.0 on 2017-07-16 + * `:conditional?` option for `create-table-ddl` and `drop-table-ddl` to provide for existence check (or a function to manipulate the generated DDL). + * Add better support for Oracle connections (default port to `1521`, support `:dbtype "oracle"` -- as `"oracle:thin"` -- and `:dbtype "oracle:oci"`, with `@` instead of `//` before host). + +* Release 0.7.0-beta5 on 2017-07-05 + * `get-connection` now accepts an `opts` map with `:auto-commit?` and `:read-only?` options. If present, the appropriate methods will be called on the connection obtained. These options are valid in any function call that may call `get-connection` under the hood. This should allow for streaming results in a query for most databases [JDBC-153](https://clojure.atlassian.net/browse/JDBC-153). + * Additional validation of options is performed in `prepared-statement` to avoid silently ignoring invalid combinations of `:concurrency`, `:cursors`, `:result-type`, and `:return-keys`. + +* Release 0.7.0-beta4 on 2017-07-04 + * `opts` are now correctly passed from `reducible-query` to `db-query-with-resultset`. + * Updated the `::query-options` spec to make it clear that `::prepare-options` are also acceptable there. + +* Release 0.7.0-beta3 on 2017-07-04 + * Reflection warnings removed in `reducible-result-set` [JDBC-152](https://clojure.atlassian.net/browse/JDBC-152). + +* Release 0.7.0-beta2 on 2017-06-30 (a.k.a The Reducible Saga, Part 2) + * Support for Clojure 1.5 and 1.6 has been dropped -- breaking change. + * Or, put another way, `clojure.java.jdbc` now requires Clojure 1.7 or later! + * All public functions now have specs in the optional `clojure.java.jdbc.spec` namespace (requires `clojure.spec.alpha`). + * `reducible-query` and `reducible-result-set` use `IReduce` and correctly support the no-`init` arity of `reduce` by using the first row of the `ResultSet`, if present, as the (missing) `init` value, and only calling `f` with no arguments if the `ResultSet` is empty. The `init` arity of `reduce` only ever calls `f` with two arguments. + +* Release 0.7.0-beta1 on 2017-06-29 + * Support for Clojure 1.4.0 has been dropped -- breaking change. + * Optional spec support now uses `clojure.spec.alpha`. + * `reducible-query` accepts a `db-spec` and a SQL/parameters vector and returns a reducible (`IReduce` on Clojure 1.7 or later; `CollReduce` on Clojure 1.5/1.6): when reduced, it runs the query, obtains a reducible result set, and then reduces that. A reducible query will run the query each time it is reduced. The helper function `reducible-result-set` is public: it accepts a `ResultSet` and produces a reducible that offers a single pass reduce over the rows. Both functions honor `reduced` values to short-circuit the process [JDBC-99](https://clojure.atlassian.net/browse/JDBC-99). + +* Release 0.7.0-alpha3 on 2017-03-23 + * `classname` is now accepted with `dbtype` / `dbname` so you can easily specify a JDBC driver class name for a database type that is not known [JDBC-151](https://clojure.atlassian.net/browse/JDBC-151). + * `redshift` has been added as a `dbtype` with `com.amazon.redshift.jdbc.Driver` as the driver name. + +* Release 0.7.0-alpha2 on 2017-03-01 + * `pgsql` and the Impossibl PostgresSQL 'NG' driver are now supported (note that `:max-rows` does not work with this driver!); also, providing unknown `dbtype` or `subprotocol` in a `db-spec` should now throw a better exception [JDBC-150](https://clojure.atlassian.net/browse/JDBC-150). + * `quoted` now accepts keywords for database / dialect (`:ansi` (including PostgresSQL), `:mysql`, `:oracle`, `:sqlserver` -- these match the keywords used in HoneySQL which is the recommended third party SQL DSL for java.jdbc) [JDBC-149](https://clojure.atlassian.net/browse/JDBC-149). + * Reorder `get-connection` clauses to make it easier to combine keys in a `db-spec` [JDBC-148](https://clojure.atlassian.net/browse/JDBC-148). + * Force load `DriverManager` before `classForName` call on drivers to avoid potential race condition on initialization [JDBC-145](https://clojure.atlassian.net/browse/JDBC-145). + +* Release 0.7.0-alpha1 on 2016-11-12 -- potentially breaking changes + * The signatures of `as-sql-name` and `quoted` have changed slightly: the former no longer has the curried (single argument) version, and the latter no longer has the two argument version. This change came out of a discussion on Slack which indicated curried functions are non-idiomatic. If you relied on the curried version of `as-sql-name`, you will not need to use `partial`. If you relied on the two argument version of `quoted`, you will need to add an extra `( )` for the one argument call. I'd be fairly surprised if anyone is using `as-sql-name` at all since it is really an implementation detail. I'd also be surprised if anyone was using the two argument version of `quoted` since the natural usage is `:entities (quoted [\[ \]])` to create a naming strategy (that provides SQL entity quoting). + * Clarified that `insert-multi!` with a sequence of row maps may be substantially slower than with a sequence of row value vectors (the former performs an insert for each row, the latter performs a single insert for all the data together) [JDBC-147](https://clojure.atlassian.net/browse/JDBC-147). + * All options are passed through all function calls, expanding the range of options you can pass into high-level functions such as `insert!` and `update!` [JDBC-144](https://clojure.atlassian.net/browse/JDBC-144). + * Added `get-isolation-level` to return the current transaction's isolation level, if any [JDBC-141](https://clojure.atlassian.net/browse/JDBC-141). + * Added support for `read-columns` option to allow more flexible customization of reading column values from a result set (particularly in a multi-database application). Also expands `set-parameters` support to options (previously it was just part of the db-spec) [JDBC-137](https://clojure.atlassian.net/browse/JDBC-137). + * Expanded optional `clojure.spec` coverage to almost the whole library API. + +* Release 0.6.2-alpha3 on 2016-08-25 + * Fixed bad interaction between `:qualifier` and existing `:identifiers` functionality [JDBC-140](https://clojure.atlassian.net/browse/JDBC-140). + * Updated the README and docstrings to reflect that `:dbtype` is the easiest / preferred way to write `db-spec` maps [JDBC-139](https://clojure.atlassian.net/browse/JDBC-139). + * Fixed postgres / postgresql alias support [JDBC-138](https://clojure.atlassian.net/browse/JDBC-138). + This also adds aliases for mssql (sqlserver), jtds (jtds:sqlserver), oracle (oracle:thin), and hsql (hsqldb). + +* Release 0.6.2-alpha2 on 2016-07-21 + * Update `clojure.spec` support to work with Clojure 1.9.0 Alpha 10. + +* Release 0.6.2-alpha1 on 2016-07-05 + * Experimental support for `clojure.spec` via the new `clojure.java.jdbc.spec` namespace. Requires Clojure 1.9.0 Alpha 8 (or later). + * All options to all functions can now have defaults within the `db-spec` itself [JDBC-136](https://clojure.atlassian.net/browse/JDBC-136). + * `query` (and by extension `find-by-keys` and `get-by-id`) now support `:explain?` and `:explain-fn` options to help support basic performance analysis [JDBC-135](https://clojure.atlassian.net/browse/JDBC-135). + * `insert!` and `insert-multi!` now respect `:identifiers` and `:qualifier` because inserting rows on PostgreSQL returns full rows, not just the newly inserted keys [JDBC-134](https://clojure.atlassian.net/browse/JDBC-134). + * In addition to the `:identifiers` option, you can now use `:qualifier` to specify a namespace qualifier (string) to be used when constructing keywords from SQL column names [JDBC-133](https://clojure.atlassian.net/browse/JDBC-133). + * Release 0.6.1 on 2016-05-12 -- **IMPORTANT BUG FIX!** - * `insert!` and `insert-multi!` now default `:transaction?` to `true` (as they should have done in 0.6.0!) [JDBC-128](http://dev.clojure.org/jira/browse/JDBC-128). These two functions also have improved docstrings to clarify the difference in behavior between inserting rows as maps compared to inserting rows as a series of column values. - * PostgreSQL support has been improved: java.jdbc is now tested against PostgreSQL locally (as well as SQLite, Apache Derby, HSQLDB, H2, MySQL, MS SQL Server (both MS Type 4 driver and jTDS driver). [JDBC-127](http://dev.clojure.org/jira/browse/JDBC-127) and [JDBC-129](http://dev.clojure.org/jira/browse/JDBC-129). + * `insert!` and `insert-multi!` now default `:transaction?` to `true` (as they should have done in 0.6.0!) [JDBC-128](https://clojure.atlassian.net/browse/JDBC-128). These two functions also have improved docstrings to clarify the difference in behavior between inserting rows as maps compared to inserting rows as a series of column values. + * PostgreSQL support has been improved: java.jdbc is now tested against PostgreSQL locally (as well as SQLite, Apache Derby, HSQLDB, H2, MySQL, MS SQL Server (both MS Type 4 driver and jTDS driver). [JDBC-127](https://clojure.atlassian.net/browse/JDBC-127) and [JDBC-129](https://clojure.atlassian.net/browse/JDBC-129). * Release 0.6.0 on 2016-05-11 -- **BREAKING RELEASE! DEPRECATED FUNCTIONALITY REMOVED!** - * `find-by-keys` now correctly handles `nil` values [JDBC-126](http://dev.clojure.org/jira/browse/JDBC-126). 0.6.0 / 2016-05-11. + * `find-by-keys` now correctly handles `nil` values [JDBC-126](https://clojure.atlassian.net/browse/JDBC-126). 0.6.0 / 2016-05-11. * `find-by-keys` calls `seq` on `:order-by` to treat `[]` as no `ORDER BY` clause. 0.6.0 / 2016-05-11. - * `db-query-with-resultset` now accepts an options map and passes it to `prepare-statement` [JDBC-125](http://dev.clojure.org/jira/browse/JDBC-125). 0.6.0-rc2 / 2016-05-07. + * `db-query-with-resultset` now accepts an options map and passes it to `prepare-statement` [JDBC-125](https://clojure.atlassian.net/browse/JDBC-125). 0.6.0-rc2 / 2016-05-07. - Passing the `prepare-statement` options map as the first element of the `[sql & params]` vector is no longer supported and will throw an `IllegalArgumentException`. It was always very poorly documented and almost never used, as far as I can tell. * `db-query-with-resultset` no longer requires the `sql-params` argument to be a vector: a sequence is acceptable. This is in line with other functions that accept a sequence. 0.6.0-rc2 / 2016-05-07. * `db-query-with-resultset` now accepts a bare SQL string or `PreparedStatement` as the `sql-params` argument, when there are no parameters needed. This is in line with other functions that accept SQL or a `PreparedStatement`. 0.6.0-rc2 / 2016-05-07. - * `query`'s options map now is passed to `db-query-with-resultset` and thus can contain options to be used to construct the `PreparedStatement` [JDBC-125](http://dev.clojure.org/jira/browse/JDBC-125). 0.6.0-rc2 / 2016-05-07. + * `query`'s options map now is passed to `db-query-with-resultset` and thus can contain options to be used to construct the `PreparedStatement` [JDBC-125](https://clojure.atlassian.net/browse/JDBC-125). 0.6.0-rc2 / 2016-05-07. * Adds `get-by-id` and `find-by-keys` convenience functions (these were easy to add after the API changes in 0.6.0 and we rely very heavily on them at World Singles so putting them in the core for everyone seemed reasonable). 0.6.0-rc1 / 2016-05-04. - `find-by-keys` accepts an `:order-by` option that expects a sequence of orderings; an ordering is a column name (keyword) or a map from column name (keyword) to direction (`:asc` or `:desc`). 0.6.0-rc2 / 2016-05-07. - * Ensures SQL / params are actually vectors prior to destructuring (this addresses an interop edge case from other languages) [JDBC-124](http://dev.clojure.org/jira/browse/JDBC-124). 0.6.0-alpha2 / 2016-04-18. - * Fix typo in `insert-multi!` argument validation exception [JDBC-123](http://dev.clojure.org/jira/browse/JDBC-123). 0.6.0-alpha2 / 2016-04-18. - * ALL DEPRECATED FUNCTIONALITY HAS BEEN REMOVED! [JDBC-118](http://dev.clojure.org/jira/browse/JDBC-118). 0.6.0-alpha1 / 2016-04-13 + * Ensures SQL / params are actually vectors prior to destructuring (this addresses an interop edge case from other languages) [JDBC-124](https://clojure.atlassian.net/browse/JDBC-124). 0.6.0-alpha2 / 2016-04-18. + * Fix typo in `insert-multi!` argument validation exception [JDBC-123](https://clojure.atlassian.net/browse/JDBC-123). 0.6.0-alpha2 / 2016-04-18. + * ALL DEPRECATED FUNCTIONALITY HAS BEEN REMOVED! [JDBC-118](https://clojure.atlassian.net/browse/JDBC-118). 0.6.0-alpha1 / 2016-04-13 - See changes described in versions 0.5.5 through 0.5.8 for what was deprecated - Use version 0.5.8 as a bridge to identify any deprecated API calls on which your code relies! - `db-transaction` (deprecated in version 0.3.0) has been removed - The `java.jdbc.deprecated` namespace has been removed * Release 0.5.8 on 2016-04-12 - * `db-do-commands` now expects multiple commands to be be wrapped in a vector [JDBC-122](http://dev.clojure.org/jira/browse/JDBC-123). The single command form is unchanged (but may be wrapped in a vector). Calling `db-do-commands` with multiple commands (not wrapped in a single vector) will produce a "DEPRECATED" warning printed to the console. - * `db-do-prepared` and `db-do-prepared-return-keys` now expect to receive a `db-spec`, an optional `transaction?` boolean, a `sql-params` argument, and an optional options map. `sql-params` is a vector containing a SQL string or `PreparedStatement` followed by parameters -- like other APIs in this library. In addition, like the `:multi? true` version of `execute!`, `db-do-prepared` can accept a vector that has parameter groups: multiple vectors containing groups of parameter values [JDBC-122](http://dev.clojure.org/jira/browse/JDBC-123). Calling `db-do-prepared` with unrolled arguments -- the SQL string / statement followed by parameter groups -- is deprecated and will produce "DEPRECATED" warnings printed to the console. + * `db-do-commands` now expects multiple commands to be be wrapped in a vector [JDBC-122](https://clojure.atlassian.net/browse/JDBC-123). The single command form is unchanged (but may be wrapped in a vector). Calling `db-do-commands` with multiple commands (not wrapped in a single vector) will produce a "DEPRECATED" warning printed to the console. + * `db-do-prepared` and `db-do-prepared-return-keys` now expect to receive a `db-spec`, an optional `transaction?` boolean, a `sql-params` argument, and an optional options map. `sql-params` is a vector containing a SQL string or `PreparedStatement` followed by parameters -- like other APIs in this library. In addition, like the `:multi? true` version of `execute!`, `db-do-prepared` can accept a vector that has parameter groups: multiple vectors containing groups of parameter values [JDBC-122](https://clojure.atlassian.net/browse/JDBC-123). Calling `db-do-prepared` with unrolled arguments -- the SQL string / statement followed by parameter groups -- is deprecated and will produce "DEPRECATED" warnings printed to the console. * Release 0.5.7 on 2016-04-10 - * `(insert! db table [:col] ["val"] {})` syntax, introduced in 0.5.6, threw an exception [JDBC-121](http://dev.clojure.org/jira/browse/JDBC-121). + * `(insert! db table [:col] ["val"] {})` syntax, introduced in 0.5.6, threw an exception [JDBC-121](https://clojure.atlassian.net/browse/JDBC-121). * Release 0.5.6 on 2016-04-10 - * `create-table-ddl` now expects the column specs to be wrapped in a single vector and no longer needs the `:options` delimiter to specify the options map [JDBC-120](http://dev.clojure.org/jira/browse/JDBC-120). + * `create-table-ddl` now expects the column specs to be wrapped in a single vector and no longer needs the `:options` delimiter to specify the options map [JDBC-120](https://clojure.atlassian.net/browse/JDBC-120). - If column specs are not wrapped in a vector, you will get a "DEPRECATED" warning printed to the console. - * `insert!` now supports only single row insertion; multi-row insertion is deprecated. `insert-multi!` has been added for multi-row insertion. `:options` is no longer needed as a delimiter for the options map [JDBC-119](http://dev.clojure.org/jira/browse/JDBC-119). + * `insert!` now supports only single row insertion; multi-row insertion is deprecated. `insert-multi!` has been added for multi-row insertion. `:options` is no longer needed as a delimiter for the options map [JDBC-119](https://clojure.atlassian.net/browse/JDBC-119). - If `insert!` is called with multiple rows, or `:options` is specified, you will get a "DEPRECATED" warning printed to the console. * NOTE: all deprecated functionality will go away in version 0.6.0! * Release 0.5.5 on 2016-04-09 - * Allow options map in all calls that previously took optional keyword arguments [JDBC-117](http://dev.clojure.org/jira/browse/JDBC-117). + * Allow options map in all calls that previously took optional keyword arguments [JDBC-117](https://clojure.atlassian.net/browse/JDBC-117). - The unrolled keyword argument forms of call are deprecated -- and print a "DEPRECATED" message to the console! -- and will go away in 0.6.0. * Release 0.5.0 on 2016-03-27 - * Allow PreparedStatement in db-do-prepared-return-keys [JDBC-115](http://dev.clojure.org/jira/browse/JDBC-115). - * Remove exception wrapping [JDBC-114](http://dev.clojure.org/jira/browse/JDBC-114). + * Allow PreparedStatement in db-do-prepared-return-keys [JDBC-115](https://clojure.atlassian.net/browse/JDBC-115). + * Remove exception wrapping [JDBC-114](https://clojure.atlassian.net/browse/JDBC-114). * Drop Clojure 1.3 compatibility. * Release 0.4.2 on 2015-09-15 - * Remove redundant type hints [JDBC-113](http://dev.clojure.org/jira/browse/JDBC-113) - Michael Blume. - * Avoid reflection on `.prepareStatement` [JDBC-112](http://dev.clojure.org/jira/browse/JDBC-112) - Michael Blume. - * Add `metadata-query` macro to make metadata query / results easier to work with for [JDBC-107](http://dev.clojure.org/jira/browse/JDBC-107). - * `prepare-statement` `:return-keys` may now be a vector of (auto-generated) column names to return, in addition to just being truthy or falsey. This allows keys to be returned for more databases. [JDBC-104](http://dev.clojure.org/jira/browse/JDBC-104). - * Officially support H2 (and test against it) to support [JDBC-91](http://dev.clojure.org/jira/browse/JDBC-91) and clarify docstrings to improve debugging driver-specific restrictions on SQL. + * Remove redundant type hints [JDBC-113](https://clojure.atlassian.net/browse/JDBC-113) - Michael Blume. + * Avoid reflection on `.prepareStatement` [JDBC-112](https://clojure.atlassian.net/browse/JDBC-112) - Michael Blume. + * Add `metadata-query` macro to make metadata query / results easier to work with for [JDBC-107](https://clojure.atlassian.net/browse/JDBC-107). + * `prepare-statement` `:return-keys` may now be a vector of (auto-generated) column names to return, in addition to just being truthy or falsey. This allows keys to be returned for more databases. [JDBC-104](https://clojure.atlassian.net/browse/JDBC-104). + * Officially support H2 (and test against it) to support [JDBC-91](https://clojure.atlassian.net/browse/JDBC-91) and clarify docstrings to improve debugging driver-specific restrictions on SQL. * Release 0.4.0 / 0.4.1 on 2015-07-26 - * `db-do-prepared` now allows `transaction?` to be omitted when a `PreparedStatement` is passed as the second argument [JDBC-111](http://dev.clojure.org/jira/browse/JDBC-111) - Stefan Kamphausen. - * Nested transaction checks isolation level is the same [JDBC-110](http://dev.clojure.org/jira/browse/JDBC-110) - Donald Ball. - * Default PostgreSQL port; Support more dbtype/dbname variants [JDBC-109](http://dev.clojure.org/jira/browse/JDBC-109). + * `db-do-prepared` now allows `transaction?` to be omitted when a `PreparedStatement` is passed as the second argument [JDBC-111](https://clojure.atlassian.net/browse/JDBC-111) - Stefan Kamphausen. + * Nested transaction checks isolation level is the same [JDBC-110](https://clojure.atlassian.net/browse/JDBC-110) - Donald Ball. + * Default PostgreSQL port; Support more dbtype/dbname variants [JDBC-109](https://clojure.atlassian.net/browse/JDBC-109). * Drop Clojure 1.2 compatibility. * Release 0.3.7 on 2015-05-18 * Bump all driver versions in `project.clj` and re-test. - * Remove duplicate `count` calls in `insert-sql` [JDBC-108](http://dev.clojure.org/jira/browse/JDBC-108) - Earl St Sauver. - * Remove driver versions from README and link to Maven Central [JDBC-106](http://dev.clojure.org/jira/browse/JDBC-106). - * Fix links in CHANGES and README [JDBC-103](http://dev.clojure.org/jira/browse/JDBC-103) - John Walker. + * Remove duplicate `count` calls in `insert-sql` [JDBC-108](https://clojure.atlassian.net/browse/JDBC-108) - Earl St Sauver. + * Remove driver versions from README and link to Maven Central [JDBC-106](https://clojure.atlassian.net/browse/JDBC-106). + * Fix links in CHANGES and README [JDBC-103](https://clojure.atlassian.net/browse/JDBC-103) - John Walker. * Release 0.3.6 on 2014-10-28 - * Arbitrary values allowed for `:cursors`, `:concurrency`, `:result-type` arguments to `prepare-statement` [JDBC-102](http://dev.clojure.org/jira/browse/JDBC-102). - * Allow `:as-arrays? :cols-as-is` to omit column name uniqueness when returning result sets as arrrays [JDBC-101](http://dev.clojure.org/jira/browse/JDBC-101). - * Add `:timeout` argument to `prepare-statement` [JDBC-100](http://dev.clojure.org/jira/browse/JDBC-100). + * Arbitrary values allowed for `:cursors`, `:concurrency`, `:result-type` arguments to `prepare-statement` [JDBC-102](https://clojure.atlassian.net/browse/JDBC-102). + * Allow `:as-arrays? :cols-as-is` to omit column name uniqueness when returning result sets as arrrays [JDBC-101](https://clojure.atlassian.net/browse/JDBC-101). + * Add `:timeout` argument to `prepare-statement` [JDBC-100](https://clojure.atlassian.net/browse/JDBC-100). * Release 0.3.5 on 2014-08-01 * Reflection warnings on executeUpdate addressed. - * HSQLDB and SQLite in-memory strings are now accepted [JDBC-94](http://dev.clojure.org/jira/browse/JDBC-94). - * Add support for readonly transactions via :read-only? [JDBC-93](http://dev.clojure.org/jira/browse/JDBC-93). + * HSQLDB and SQLite in-memory strings are now accepted [JDBC-94](https://clojure.atlassian.net/browse/JDBC-94). + * Add support for readonly transactions via :read-only? [JDBC-93](https://clojure.atlassian.net/browse/JDBC-93). * Release 0.3.4 on 2014-06-30 - * execute! can now accept a PreparedStatement [JDBC-96](http://dev.clojure.org/jira/browse/JDBC-96). - * Support simpler db-spec with :dbtype and :dbname (and optional :host and :port etc) [JDBC-92](http://dev.clojure.org/jire/browse/JDBC-92). - * Support oracle:oci and oracle:thin subprotocols [JDBC-90](http://dev.clojure.org/jira/browse/JDBC-90). + * execute! can now accept a PreparedStatement [JDBC-96](https://clojure.atlassian.net/browse/JDBC-96). + * Support simpler db-spec with :dbtype and :dbname (and optional :host and :port etc) [JDBC-92](https://clojure.atlassian.net/browse/JDBC-92). + * Support oracle:oci and oracle:thin subprotocols [JDBC-90](https://clojure.atlassian.net/browse/JDBC-90). * Release 0.3.3 on 2014-01-30 - * Prevent exception/crash when query called with bare SQL string [JDBC-89](http://dev.clojure.org/jira/browse/JDBC-89). - * Add :row-fn and :result-set-fn to metadata-result function [JDBC-87](http://dev.clojure.org/jira/browse/JDBC-87). + * Prevent exception/crash when query called with bare SQL string [JDBC-89](https://clojure.atlassian.net/browse/JDBC-89). + * Add :row-fn and :result-set-fn to metadata-result function [JDBC-87](https://clojure.atlassian.net/browse/JDBC-87). * Support key/value configuration from URI (Phil Hagelberg). * Release 0.3.2 on 2013-12-30 @@ -195,23 +351,23 @@ Change Log * Release 0.3.1 on 2013-12-29 (broken; use 0.3.2 instead) * Improve docstrings and add :arglists for better auto-generated documentation. * Make insert-sql private - technically a breaking change but it should never have been public: sorry folks! - * Provide better protocol for setting parameters in prepared statements [JDBC-86](http://dev.clojure.org/jira/browse/JDBC-86). - * Fix parens in two deprecated tests [JDBC-85](http://dev.clojure.org/jira/browse/JDBC-85). + * Provide better protocol for setting parameters in prepared statements [JDBC-86](https://clojure.atlassian.net/browse/JDBC-86). + * Fix parens in two deprecated tests [JDBC-85](https://clojure.atlassian.net/browse/JDBC-85). * Made create-table-ddl less aggressive about applying as-sql-name so only first name in a column spec is affected. * Release 0.3.0 on 2013-12-16 - * Ensure canonical Boolean to workaround strange behavior in some JDBC drivers [JDBC-84](http://dev.clojure.org/jira/browse/JDBC-84). - * Rename recently introduced test to ensure unique names [JDBC-83](http://dev.clojure.org/jira/browse/JDBC-83). - * Rename unused arguments in protocol implementation to support Android [JDBC-82](http://dev.clojure.org/jira/browse/JDBC-82). - * Correctly handle empty param group sequence in execute! (which only seemed to affect SQLite) [JDBC-65](http://dev.clojure.org/jira/browse/JDBC-65). + * Ensure canonical Boolean to workaround strange behavior in some JDBC drivers [JDBC-84](https://clojure.atlassian.net/browse/JDBC-84). + * Rename recently introduced test to ensure unique names [JDBC-83](https://clojure.atlassian.net/browse/JDBC-83). + * Rename unused arguments in protocol implementation to support Android [JDBC-82](https://clojure.atlassian.net/browse/JDBC-82). + * Correctly handle empty param group sequence in execute! (which only seemed to affect SQLite) [JDBC-65](https://clojure.atlassian.net/browse/JDBC-65). * Release 0.3.0-rc1 on 2013-12-12 - * Deprecate db-transaction (new in 0.3.0) in favor of with-db-transaction [JDBC-81](http://dev.clojure.org/jira/browse/JDBC-81). - * Add with-db-metadata macro and metadata-result function to make it easier to work with SQL metadata [JDBC-80](http://dev.clojure.org/jira/browse/JDBC-80). - * Add with-db-connection macro to make it easier to run groups of operations against a single open connection [JDBC-79](http://dev.clojure.org/jira/browse/JDBC-79). - * Add ISQLValue protocol to make it easier to support custom SQL types for parameters in SQL statements [JDBC-77](http://dev.clojure.org/jira/browse/JDBC-77). - * Add support for :isolation in with-db-transaction [JDBC-75](http://dev.clojure.org/jira/browse/JDBC-75). - * Add :user as an alias for :username for DataSource connections [JDBC-74](http://dev.clojure.org/jira/browse/JDBC-74). + * Deprecate db-transaction (new in 0.3.0) in favor of with-db-transaction [JDBC-81](https://clojure.atlassian.net/browse/JDBC-81). + * Add with-db-metadata macro and metadata-result function to make it easier to work with SQL metadata [JDBC-80](https://clojure.atlassian.net/browse/JDBC-80). + * Add with-db-connection macro to make it easier to run groups of operations against a single open connection [JDBC-79](https://clojure.atlassian.net/browse/JDBC-79). + * Add ISQLValue protocol to make it easier to support custom SQL types for parameters in SQL statements [JDBC-77](https://clojure.atlassian.net/browse/JDBC-77). + * Add support for :isolation in with-db-transaction [JDBC-75](https://clojure.atlassian.net/browse/JDBC-75). + * Add :user as an alias for :username for DataSource connections [JDBC-74](https://clojure.atlassian.net/browse/JDBC-74). * Release 0.3.0-beta2 on 2013-11-24 * **BREAKING CHANGES!** @@ -219,40 +375,40 @@ Change Log * The older API (0.2.3) which was deprecated in earlier 0.3.0 builds has moved to `clojure.java.jdbc.deprecated` to help streamline the API for 0.3.0 and clean up the documentation. * Release 0.3.0-beta1 on 2013-11-03 - * query as-arrays? now allows you to leverage lazy result fetching [JDBC-72](http://dev.clojure.org/jira/browse/JDBC-72). + * query as-arrays? now allows you to leverage lazy result fetching [JDBC-72](https://clojure.atlassian.net/browse/JDBC-72). * "h2" is recognized as a protocol shorthand for org.h2.Driver - * Tests no longer use :1 literal [JDBC-71](http://dev.clojure.org/jira/browse/JDBC-71). - * Conditional use of javax.naming.InitialContext so it can be compiled on Android [JDBC-69](http://dev.clojure.org/jira/browse/JDBC-69). - * New db-query-with-resultset function replaces private db-with-query-results* and processes a raw ResultSet object [JDBC-63](http://dev.clojure.org/jira/browse/JDBC-63). - * Allow :set-parameters in db-spec to override set-parameters internal function to allow per-DB special handling of SQL parameters values (such as null for Teradata) [JDBC-40](http://dev.clojure.org/jira/browse/JDBC-40). + * Tests no longer use :1 literal [JDBC-71](https://clojure.atlassian.net/browse/JDBC-71). + * Conditional use of javax.naming.InitialContext so it can be compiled on Android [JDBC-69](https://clojure.atlassian.net/browse/JDBC-69). + * New db-query-with-resultset function replaces private `db-with-query-results*` and processes a raw ResultSet object [JDBC-63](https://clojure.atlassian.net/browse/JDBC-63). + * Allow :set-parameters in db-spec to override set-parameters internal function to allow per-DB special handling of SQL parameters values (such as null for Teradata) [JDBC-40](https://clojure.atlassian.net/browse/JDBC-40). * Release 0.3.0-alpha5 on 2013-09-15 - * DDL now supports entities naming strategy [JDBC-53](http://dev.clojure.org/jira/browse/JDBC-53). - * Attempt to address potential memory leaks due to closures - see [Christophe Grand's blog post on Macros, closures and unexpected object retention](http://clj-me.cgrand.net/2013/09/11/macros-closures-and-unexpected-object-retention/). - * Documentation has moved to [Using java.jdbc on Clojure-Doc.org](http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html) + * DDL now supports entities naming strategy [JDBC-53](https://clojure.atlassian.net/browse/JDBC-53). + * Attempt to address potential memory leaks due to closures - see [Christophe Grand's blog post on Macros, closures and unexpected object retention](https://clj-me.cgrand.net/2013/09/11/macros-closures-and-unexpected-object-retention/). + * Documentation has moved to [Using java.jdbc on Clojure-Doc.org](https://clojure-doc.org/articles/ecosystem/java_jdbc/home.html) * Added Leiningen support for easier development/testing (Maven is still the primary build tool). - * Added create-index / drop-index DDL [JDBC-62](http://dev.clojure.org/jira/browse/JDBC-62) - moquist - * Make transaction? boolean optional in various db-do-* functions + * Added create-index / drop-index DDL [JDBC-62](https://clojure.atlassian.net/browse/JDBC-62) - moquist + * Make transaction? boolean optional in various `db-do-*` functions * Create clojure.java.jdbc.ddl namespace * Add create-table, drop-table, create-index and drop-index * Deprecate create-table, create-table-ddl and drop-table in main namespace * Update README to clarify PostgreSQL instructions. - * Fix test suite for PostgreSQL [JDBC-59](http://dev.clojure.org/jira/browser/JDBC-59) - * Improve hooks for Oracle data type handling [JDBC-57](http://dev.clojure.org/jira/browser/JDBC-57) - * Fix reflection warnings [JDBC-55](http://dev.clojure.org/jira/browser/JDBC-55) + * Fix test suite for PostgreSQL [JDBC-59](https://clojure.atlassian.net/browser/JDBC-59) + * Improve hooks for Oracle data type handling [JDBC-57](https://clojure.atlassian.net/browser/JDBC-57) + * Fix reflection warnings [JDBC-55](https://clojure.atlassian.net/browser/JDBC-55) * Release 0.3.0-alpha4 on 2013-05-11 - * Fix connection leaks [JDBC-54](http://dev.clojure.org/jira/browser/JDBC-54) + * Fix connection leaks [JDBC-54](https://clojure.atlassian.net/browser/JDBC-54) * Allow order-by to accept empty sequence (and return empty string) * Release 0.3.0-alpha3 on 2013-05-04 * Fix macro / import interaction by fully qualifying Connection type. * Release 0.3.0-alpha2 on 2013-05-03 - * Address [JDBC-51](http://dev.clojure.org/jira/browse/JDBC-51) by declaring get-connection returns java.sql.Connection - * Add IResultSetReadColumn protocol extension point for custom read conversions [JDBC-46](http://dev.clojure.org/jira/browse/JDBC-46) - * Add :multi? to execute! so it can be used for repeated operations [JDBC-52](http://dev.clojure.org/jira/browse/JDBC-52) - * Reverted specialized handling of NULL values (reopens [JDBC-40](http://dev.clojure.org/jira/browse/JDBC-40)) + * Address [JDBC-51](https://clojure.atlassian.net/browse/JDBC-51) by declaring get-connection returns java.sql.Connection + * Add IResultSetReadColumn protocol extension point for custom read conversions [JDBC-46](https://clojure.atlassian.net/browse/JDBC-46) + * Add :multi? to execute! so it can be used for repeated operations [JDBC-52](https://clojure.atlassian.net/browse/JDBC-52) + * Reverted specialized handling of NULL values (reopens [JDBC-40](https://clojure.atlassian.net/browse/JDBC-40)) * Rename :as-arrays to :as-arrays? since it is boolean * Add curried version of clojure.java.jdbc.sql/as-quoted-str * Officially deprecate resultset-seq @@ -261,76 +417,92 @@ Change Log * MAJOR API OVERHAUL! * Most of the old 0.2.x API has been deprecated and a new, more idiomatic API introduced, along with a minimal DSL to generate basic SQL * Specifics: - * Add insert!, query, update!, delete! and execute! high-level API [JDBC-20](http://dev.clojure.org/jira/browse/JDBC-20) + * Add insert!, query, update!, delete! and execute! high-level API [JDBC-20](https://clojure.atlassian.net/browse/JDBC-20) * Add optional SQL-generating DSL in clojure.java.jdbc.sql (implied by JDBC-20) * Add db- prefixed versions of low-level API * Add db-transaction macro * Add result-set-seq as replacement for resultset-seq (which will be deprecated) - * Transaction now correctly rollback on non-Exception Throwables [JDBC-43](http://dev.clojure.org/jira/browse/JDBC-43) - * Rewrite old API functions in terms of new API, and deprecate old API [JDBC-43](http://dev.clojure.org/jira/browse/JDBC-43) - * Add :as-arrays to query / result-set-seq [JDBC-41](http://dev.clojure.org/jira/browse/JDBC-41) - * Better handling of NULL values [JDBC-40](http://dev.clojure.org/jira/browse/JDBC-40) and [JDBC-18](http://dev.clojure.org/jira/browse/JDBC-18) + * Transaction now correctly rollback on non-Exception Throwables [JDBC-43](https://clojure.atlassian.net/browse/JDBC-43) + * Rewrite old API functions in terms of new API, and deprecate old API [JDBC-43](https://clojure.atlassian.net/browse/JDBC-43) + * Add :as-arrays to query / result-set-seq [JDBC-41](https://clojure.atlassian.net/browse/JDBC-41) + * Better handling of NULL values [JDBC-40](https://clojure.atlassian.net/browse/JDBC-40) and [JDBC-18](https://clojure.atlassian.net/browse/JDBC-18) Note: JDBC-40 is being reverted in 0.3.0-alpha2 because it introduces regressions in PostgreSQL - * db-do-commands allows you to execute SQL without a transaction wrapping it [JDBC-38](http://dev.clojure.org/jira/browse/JDBC-38) + * db-do-commands allows you to execute SQL without a transaction wrapping it [JDBC-38](https://clojure.atlassian.net/browse/JDBC-38) * Remove reflection warning from execute-batch * Add notes to README about 3rd party database driver dependencies * Add optional :identifiers argument to resultset-seq so you can explicitly pass in the naming strategy + * Release 0.2.3 on 2012-06-18 * as-str now treats a.b as two identifiers separated by . so quoting produces [a].[b] instead of [a.b] - * Add :connection-uri option [JDBC-34](http://dev.clojure.org/jira/browse/JDBC-34) + * Add :connection-uri option [JDBC-34](https://clojure.atlassian.net/browse/JDBC-34) + * Release 0.2.2 on 2012-06-10 - * Handle Oracle unknown row count affected [JDBC-33](http://dev.clojure.org/jira/browse/JDBC-33) - * Handle jdbc: prefix in string db-specs [JDBC-32](http://dev.clojure.org/jira/browse/JDBC-32) - * Handle empty columns in make column unique (Juergen Hoetzel) [JDBC-31](http://dev.clojure.org/jira/browse/JDBC-31) + * Handle Oracle unknown row count affected [JDBC-33](https://clojure.atlassian.net/browse/JDBC-33) + * Handle jdbc: prefix in string db-specs [JDBC-32](https://clojure.atlassian.net/browse/JDBC-32) + * Handle empty columns in make column unique (Juergen Hoetzel) [JDBC-31](https://clojure.atlassian.net/browse/JDBC-31) + * Release 0.2.1 on 2012-05-10 - * Result set performance enhancement (Juergen Hoetzel) [JDBC-29](http://dev.clojure.org/jira/browse/JDBC-29) - * Make do-prepared-return-keys (for Korma team) [JDBC-30](http://dev.clojure.org/jira/browse/JDBC-30) + * Result set performance enhancement (Juergen Hoetzel) [JDBC-29](https://clojure.atlassian.net/browse/JDBC-29) + * Make do-prepared-return-keys (for Korma team) [JDBC-30](https://clojure.atlassian.net/browse/JDBC-30) + * Release 0.2.0 on 2012-04-23 - * Merge internal namespace into main jdbc namespace [JDBC-19](http://dev.clojure.org/jira/browse/JDBC-19) + * Merge internal namespace into main jdbc namespace [JDBC-19](https://clojure.atlassian.net/browse/JDBC-19) + * Release 0.1.4 on 2012-04-15 * Unwrap RTE for nested transaction exceptions (we already unwrapped top-level transaction RTEs). * Remove reflection warning unwrapping RunTimeException (Alan Malloy) + * Release 0.1.3 on 2012-02-29 - * Fix generated keys inside transactions for SQLite3 [JDBC-26](http://dev.clojure.org/jira/browse/JDBC-26) + * Fix generated keys inside transactions for SQLite3 [JDBC-26](https://clojure.atlassian.net/browse/JDBC-26) + * Release 0.1.2 on 2012-02-29 - * Handle prepared statement params correctly [JDBC-23](http://dev.clojure.org/jira/browse/JDBC-23) - * Add support for SQLite3 [JDBC-26](http://dev.clojure.org/jira/browse/JDBC-26) - * Replace replicate (deprecated) with repeat [JDBC-27](http://dev.clojure.org/jira/browse/JDBC-27) + * Handle prepared statement params correctly [JDBC-23](https://clojure.atlassian.net/browse/JDBC-23) + * Add support for SQLite3 [JDBC-26](https://clojure.atlassian.net/browse/JDBC-26) + * Replace replicate (deprecated) with repeat [JDBC-27](https://clojure.atlassian.net/browse/JDBC-27) * Ensure MS SQL Server passes tests with both Microsoft and jTDS drivers * Build server now tests derby, hsqldb and sqlite by default * Update README per Stuart Sierra's outline for contrib projects + * Release 0.1.1 on 2011-11-02 - * Accept string or URI in connection definition [JDBC-21](http://dev.clojure.org/jira/browse/JDBC-21) - * Allow driver, port and subprotocol to be deduced [JDBC-22](http://dev.clojure.org/jira/browse/JDBC-22) + * Accept string or URI in connection definition [JDBC-21](https://clojure.atlassian.net/browse/JDBC-21) + * Allow driver, port and subprotocol to be deduced [JDBC-22](https://clojure.atlassian.net/browse/JDBC-22) + * Release 0.1.0 on 2011-10-16 - * Remove dependence on deprecated structmap [JDBC-15](http://dev.clojure.org/jira/browse/JDBC-15) + * Remove dependence on deprecated structmap [JDBC-15](https://clojure.atlassian.net/browse/JDBC-15) + * Release 0.0.7 on 2011-10-11 - * Rename duplicate columns [JDBC-9](http://dev.clojure.org/jira/browse/JDBC-9) - * Ensure do-preared traps invalid SQL [JDBC-16](http://dev.clojure.org/jira/browse/JDBC-16) + * Rename duplicate columns [JDBC-9](https://clojure.atlassian.net/browse/JDBC-9) + * Ensure do-preared traps invalid SQL [JDBC-16](https://clojure.atlassian.net/browse/JDBC-16) + * Release 0.0.6 on 2011-08-04 * Improve exception handling (unwrap RTE) - * Don't use batch for update (causes exceptions on Apache Derby) [JDBC-12](http://dev.clojure.org/jire/JDBC-12) + * Don't use batch for update (causes exceptions on Apache Derby) [JDBC-12](https://clojure.atlassian.net/browse/JDBC-12) * Add test suite + * Release 0.0.5 on 2011-07-18 * Expose prepare-statement API * Allow with-query-results to accept a PreparedStatement or options for creating one, instead of SQL query string and parameters * Support databases that cannot return generated keys + * Release 0.0.4 on 2011-07-17 - * Allow :table-spec {string} in create-table [JDBC-4](http://dev.clojure.org/jire/JDBC-4) - * Remove reflection warnings [JDBC-8](http://dev.clojure.org/jire/JDBC-8) - * Ensure transactions are not committed when Error occurs [JDBC-11](http://dev.clojure.org/jire/JDBC-11) + * Allow :table-spec {string} in create-table [JDBC-4](https://clojure.atlassian.net/browse/JDBC-4) + * Remove reflection warnings [JDBC-8](https://clojure.atlassian.net/browse/JDBC-8) + * Ensure transactions are not committed when Error occurs [JDBC-11](https://clojure.atlassian.net/browse/JDBC-11) + * Release 0.0.3 on 2011-07-01 - * Key generation compatibility with MS SQL Server, PostgreSQL [JDBC-10](http://dev.clojure.org/jira/browse/JDBC-10) + * Key generation compatibility with MS SQL Server, PostgreSQL [JDBC-10](https://clojure.atlassian.net/browse/JDBC-10) + * Release 0.0.2 on 2011-06-07 - * Clojure 1.2 compatibility [JDBC-7](http://dev.clojure.org/jira/browse/JDBC-7) + * Clojure 1.2 compatibility [JDBC-7](https://clojure.atlassian.net/browse/JDBC-7) + * Release 0.0.1 on 2011-05-07 * Initial release * Changes from clojure.contrib.sql: - * Expose print-... functions; no longer write exceptions to **\*out\*** + * Expose print-... functions; no longer write exceptions to `\*out\*` * Define resultset-seq to replace clojure.core/resultset-seq - * Add naming / quoting strategies (see [name mapping documentation](http://clojure.github.com/java.jdbc/doc/clojure/java/jdbc/NameMapping.html) + * Add naming / quoting strategies (see [name mapping documentation](https://clojure.github.io/java.jdbc/doc/clojure/java/jdbc/NameMapping.html) * Return generated keys from insert operations, where possible * Add insert-record function * Clojure 1.3 compatibility @@ -338,9 +510,9 @@ Change Log Copyright and License ======================================== -Copyright (c) Sean Corfield, Stephen Gilardi, 2011-2014. All rights reserved. The use and +Copyright (c) Sean Corfield, Stephen Gilardi, 2011-2023. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public -License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can +License 1.0 (https://opensource.org/license/epl-1-0/) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any diff --git a/deps.edn b/deps.edn new file mode 100644 index 00000000..4670cbee --- /dev/null +++ b/deps.edn @@ -0,0 +1,33 @@ +;; You can run clojure.java.jdbc tests with: clj -A:test:runner +;; You can also specify an alias to select which version of Clojure to test +;; against: :1.9 :1.10 :1.11 :1.12 + +{:paths ["src/main/clojure"] + :aliases {:test + {:extra-paths ["src/test/clojure"] + :extra-deps {org.clojure/test.check {:mvn/version "1.1.3"} + org.apache.derby/derby {:mvn/version "10.14.2.0"} + org.hsqldb/hsqldb$jdk8 {:mvn/version "2.7.4"} + com.h2database/h2 {:mvn/version "1.4.197"} + net.sourceforge.jtds/jtds {:mvn/version "1.3.1"} + ;; Note: Tests fail with 6.0.2+ driver + mysql/mysql-connector-java {:mvn/version "5.1.41"} + org.postgresql/postgresql {:mvn/version "42.7.8"} + com.impossibl.pgjdbc-ng/pgjdbc-ng {:mvn/version "0.8.9"} + org.xerial/sqlite-jdbc {:mvn/version "3.51.1.0"} + ;; Note: Assumes Java 8; there's a .jre11 version as well + com.microsoft.sqlserver/mssql-jdbc {:mvn/version "13.2.0.jre8"}}} + :1.9 {:override-deps {org.clojure/clojure {:mvn/version "1.9.0"}}} + :1.10 {:override-deps {org.clojure/clojure {:mvn/version "1.10.3"}}} + :1.11 {:override-deps {org.clojure/clojure {:mvn/version "1.11.4"}}} + :1.12 {:override-deps {org.clojure/clojure {:mvn/version "1.12.4"}}} + :perf {:extra-paths ["src/perf/clojure"] + :extra-deps {criterium/criterium {:mvn/version "0.4.6"}} + :jvm-opts ["-server" + "-Xmx4096m" + "-Dclojure.compiler.direct-linking=true"]} + :runner + {:extra-deps {io.github.cognitect-labs/test-runner + {:git/tag "v0.5.1" :git/sha "dfb30dd"}} + :main-opts ["-m" "cognitect.test-runner" + "-d" "src/test/clojure"]}}} diff --git a/pom.xml b/pom.xml index 5406601a..17472a63 100644 --- a/pom.xml +++ b/pom.xml @@ -2,13 +2,14 @@ 4.0.0 java.jdbc - 0.6.2-SNAPSHOT - ${project.artifactId} + 0.7.13-SNAPSHOT + java.jdbc + JDBC utilities for Clojure. org.clojure pom.contrib - 0.1.2 + 1.4.0 @@ -27,6 +28,10 @@ HEAD + + 1.11.4 + + @@ -35,7 +40,7 @@ JAR. Projects may override as needed. --> com.theoryinpractise clojure-maven-plugin - 1.3.13 + 1.7.1 true ${clojure.warnOnReflection} @@ -62,37 +67,38 @@ mysql mysql-connector-java - 5.1.39 + 5.1.41 test org.apache.derby derby - 10.12.1.1 + 10.14.2.0 test org.hsqldb hsqldb - 2.3.3 + 2.7.4 + jdk8 test com.h2database h2 - 1.4.191 + 1.4.197 test org.postgresql postgresql - 9.4.1208.jre7 + 42.7.8 test org.xerial sqlite-jdbc - 3.8.11.2 + 3.51.1.0 test @@ -101,6 +107,12 @@ 1.3.1 test + + org.clojure + test.check + 1.1.3 + test +