fix #246; prep for 1.3.865

This commit is contained in:
Sean Corfield 2023-03-31 12:36:29 -07:00
parent b5674a169c
commit 575dac2ec9
4 changed files with 16 additions and 10 deletions

View file

@ -2,7 +2,8 @@
Only accretive/fixative changes will be made from now on. Only accretive/fixative changes will be made from now on.
* 1.3.next in progress * 1.3.865 -- 2023-03-31
* Fix [#246](https://github.com/seancorfield/next-jdbc/issues/246) by adopting the `strop` function from HoneySQL.
* Address [#245](https://github.com/seancorfield/next-jdbc/issues/245) by not `locking` the `Connection` when `*nested-tx*` is bound to `:ignore` -- improving `clojure.java.jdbc` compatibility. * Address [#245](https://github.com/seancorfield/next-jdbc/issues/245) by not `locking` the `Connection` when `*nested-tx*` is bound to `:ignore` -- improving `clojure.java.jdbc` compatibility.
* Address [#237](https://github.com/seancorfield/next-jdbc/issues/237) by adding an `:init-fn` option to the `db-spec` argument for `next.jdbc.connection/component`. * Address [#237](https://github.com/seancorfield/next-jdbc/issues/237) by adding an `:init-fn` option to the `db-spec` argument for `next.jdbc.connection/component`.

View file

@ -8,7 +8,7 @@ The next generation of `clojure.java.jdbc`: a new low-level Clojure wrapper for
The latest versions on Clojars and on cljdoc: The latest versions on Clojars and on cljdoc:
[![Clojars Project](https://clojars.org/com.github.seancorfield/next.jdbc/latest-version.svg)](https://clojars.org/com.github.seancorfield/next.jdbc) [![cljdoc badge](https://cljdoc.org/badge/com.github.seancorfield/next.jdbc?1.3.862)](https://cljdoc.org/d/com.github.seancorfield/next.jdbc/CURRENT) [![Clojars Project](https://clojars.org/com.github.seancorfield/next.jdbc/latest-version.svg)](https://clojars.org/com.github.seancorfield/next.jdbc) [![cljdoc badge](https://cljdoc.org/badge/com.github.seancorfield/next.jdbc?1.3.865)](https://cljdoc.org/d/com.github.seancorfield/next.jdbc/CURRENT)
The documentation on [cljdoc.org](https://cljdoc.org/d/com.github.seancorfield/next.jdbc/CURRENT) is for the current version of `next.jdbc`: The documentation on [cljdoc.org](https://cljdoc.org/d/com.github.seancorfield/next.jdbc/CURRENT) is for the current version of `next.jdbc`:
@ -17,7 +17,7 @@ The documentation on [cljdoc.org](https://cljdoc.org/d/com.github.seancorfield/n
* [Migrating from `clojure.java.jdbc`](https://cljdoc.org/d/com.github.seancorfield/next.jdbc/CURRENT/doc/migration-from-clojure-java-jdbc) * [Migrating from `clojure.java.jdbc`](https://cljdoc.org/d/com.github.seancorfield/next.jdbc/CURRENT/doc/migration-from-clojure-java-jdbc)
* Feedback via [issues](https://github.com/seancorfield/next-jdbc/issues) or in the [`#sql` channel on the Clojurians Slack](https://clojurians.slack.com/messages/C1Q164V29/) or the [`#sql` stream on the Clojurians Zulip](https://clojurians.zulipchat.com/#narrow/stream/152063-sql). * Feedback via [issues](https://github.com/seancorfield/next-jdbc/issues) or in the [`#sql` channel on the Clojurians Slack](https://clojurians.slack.com/messages/C1Q164V29/) or the [`#sql` stream on the Clojurians Zulip](https://clojurians.zulipchat.com/#narrow/stream/152063-sql).
The documentation on GitHub is for **develop** since the 1.3.862 release -- [see the CHANGELOG](https://github.com/seancorfield/next-jdbc/blob/develop/CHANGELOG.md) and then read the [corresponding updated documentation](https://github.com/seancorfield/next-jdbc/tree/develop/doc) on GitHub if you want. Older versions of `next.jdbc` were published under the `seancorfield` group ID and you can find [older seancorfield/next.jdbc documentation on cljdoc.org](https://cljdoc.org/versions/seancorfield/next.jdbc). The documentation on GitHub is for **develop** since the 1.3.865 release -- [see the CHANGELOG](https://github.com/seancorfield/next-jdbc/blob/develop/CHANGELOG.md) and then read the [corresponding updated documentation](https://github.com/seancorfield/next-jdbc/tree/develop/doc) on GitHub if you want. Older versions of `next.jdbc` were published under the `seancorfield` group ID and you can find [older seancorfield/next.jdbc documentation on cljdoc.org](https://cljdoc.org/versions/seancorfield/next.jdbc).
This project follows the version scheme MAJOR.MINOR.COMMITS where MAJOR and MINOR provide some relative indication of the size of the change, but do not follow semantic versioning. In general, all changes endeavor to be non-breaking (by moving to new names rather than by breaking existing names). COMMITS is an ever-increasing counter of commits since the beginning of this repository. This project follows the version scheme MAJOR.MINOR.COMMITS where MAJOR and MINOR provide some relative indication of the size of the change, but do not follow semantic versioning. In general, all changes endeavor to be non-breaking (by moving to new names rather than by breaking existing names). COMMITS is an ever-increasing counter of commits since the beginning of this repository.

View file

@ -11,12 +11,12 @@ It is designed to work with Clojure 1.10 or later, supports `datafy`/`nav`, and
You can add `next.jdbc` to your project with either: You can add `next.jdbc` to your project with either:
```clojure ```clojure
com.github.seancorfield/next.jdbc {:mvn/version "1.3.862"} com.github.seancorfield/next.jdbc {:mvn/version "1.3.865"}
``` ```
for `deps.edn` or: for `deps.edn` or:
```clojure ```clojure
[com.github.seancorfield/next.jdbc "1.3.862"] [com.github.seancorfield/next.jdbc "1.3.865"]
``` ```
for `project.clj` or `build.boot`. for `project.clj` or `build.boot`.
@ -38,7 +38,7 @@ For the examples in this documentation, we will use a local H2 database on disk,
```clojure ```clojure
;; deps.edn ;; deps.edn
{:deps {org.clojure/clojure {:mvn/version "1.10.3"} {:deps {org.clojure/clojure {:mvn/version "1.10.3"}
com.github.seancorfield/next.jdbc {:mvn/version "1.3.862"} com.github.seancorfield/next.jdbc {:mvn/version "1.3.865"}
com.h2database/h2 {:mvn/version "1.4.199"}}} com.h2database/h2 {:mvn/version "1.4.199"}}}
``` ```

View file

@ -1,4 +1,4 @@
;; copyright (c) 2019-2021 Sean Corfield, all rights reserved ;; copyright (c) 2019-2023 Sean Corfield, all rights reserved
(ns next.jdbc.quoted (ns next.jdbc.quoted
"Provides functions for use with the `:table-fn` and `:column-fn` options "Provides functions for use with the `:table-fn` and `:column-fn` options
@ -8,11 +8,16 @@
(set! *warn-on-reflection* true) (set! *warn-on-reflection* true)
(defn ansi "ANSI \"quoting\"" [s] (str \" s \")) (defn strop
"Escape any embedded closing strop characters."
[s x e]
(str s (str/replace x (str e) (str e e)) e))
(defn mysql "MySQL `quoting`" [s] (str \` s \`)) (defn ansi "ANSI \"quoting\"" [s] (strop \" s \"))
(defn sql-server "SQL Server [quoting]" [s] (str \[ s \])) (defn mysql "MySQL `quoting`" [s] (strop \` s \`))
(defn sql-server "SQL Server [quoting]" [s] (strop \[ s \]))
(def oracle "Oracle \"quoting\" (ANSI)" ansi) (def oracle "Oracle \"quoting\" (ANSI)" ansi)