Skip to content

Commit 8deaebc

Browse files
committed
JDBC-174 and JDBC-175 added to CHANGES.md
Documents rewrite batched statement options in `insert-multi!` and new `clojure.java.jdbc.datafy` namespace (experimental).
1 parent 022a1fd commit 8deaebc

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

CHANGES.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
Changes coming in 0.7.9
1+
Changes in 0.7.9
22

33
* Fix behavior of multi-inserts when database does not support generated keys [JDBC-176](https://dev.clojure.org/jira/browse/JDBC-176).
4+
* 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://dev.clojure.org/jira/browse/JDBC-175).
5+
* Add note about rewriting batched operations to `insert-multi!` for some drivers [JDBC-174](https://dev.clojure.org/jira/browse/JDBC-174).
46
* 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://dev.clojure.org/jira/browse/JDBC-173).
57

68
Changes in 0.7.8

src/main/clojure/clojure/java/jdbc.clj

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;; Copyright (c) 2008-2018 Sean Corfield, Stephen C. Gilardi. All rights reserved.
1+
;; Copyright (c) 2008-2019 Sean Corfield, Stephen C. Gilardi. All rights reserved.
22
;; The use and distribution terms for this software are covered by
33
;; the Eclipse Public License 1.0
44
;; (http://opensource.org/licenses/eclipse-1.0.php) which can be
@@ -1612,9 +1612,16 @@ http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html"}
16121612
When inserting rows as a sequence of lists of column values, the result is
16131613
a sequence of the counts of rows affected (a sequence of 1's), if available.
16141614
Yes, that is singularly unhelpful. Thank you getUpdateCount and executeBatch!
1615-
A single database operation is used to insert all the rows at once. This may
1616-
be much faster than inserting a sequence of rows (which performs an insert for
1617-
each map in the sequence).
1615+
A single database operation should be used to insert all the rows at once.
1616+
This may be much faster than inserting a sequence of rows (which performs an
1617+
insert for each map in the sequence).
1618+
1619+
Note: some database drivers need to be told to rewrite the SQL for this to
1620+
be performed as a single, batched operation. In particular, PostgreSQL
1621+
requires :reWriteBatchedInserts true and My SQL requires
1622+
:rewriteBatchedStatement true (both non-standard JDBC options, of course!).
1623+
These options should be passed into the driver when the connection is
1624+
created (however that is done in your program).
16181625
16191626
The :transaction? option specifies whether to run in a transaction or not.
16201627
The default is true (use a transaction). The :entities option specifies how

0 commit comments

Comments
 (0)