Skip to content

Commit

Permalink
fix #246; prep for 1.3.865
Browse files Browse the repository at this point in the history
  • Loading branch information
seancorfield committed Mar 31, 2023
1 parent b5674a1 commit 575dac2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

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 [#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`.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

[![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`:

Expand All @@ -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)
* 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.

Expand Down
6 changes: 3 additions & 3 deletions doc/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

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

```clojure
[com.github.seancorfield/next.jdbc "1.3.862"]
[com.github.seancorfield/next.jdbc "1.3.865"]
```
for `project.clj` or `build.boot`.

Expand All @@ -38,7 +38,7 @@ For the examples in this documentation, we will use a local H2 database on disk,
```clojure
;; deps.edn
{: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"}}}
```

Expand Down
13 changes: 9 additions & 4 deletions src/next/jdbc/quoted.clj
Original file line number Diff line number Diff line change
@@ -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
"Provides functions for use with the `:table-fn` and `:column-fn` options
Expand All @@ -8,11 +8,16 @@

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

Expand Down

0 comments on commit 575dac2

Please sign in to comment.