From 5737495c4ef057414dead3836f41e3ac283cd3ea Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Thu, 5 Nov 2020 12:47:21 -0800 Subject: [PATCH] Fixes #144; prep for 1.1.613 release --- CHANGELOG.md | 3 +++ README.md | 4 ++-- doc/getting-started.md | 6 +++--- pom.xml | 4 ++-- src/next/jdbc.clj | 26 +++++++++++++------------- 5 files changed, 23 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86939d8..4d05e42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ Only accretive/fixative changes will be made from now on. +* 1.1.613 -- 2020-11-05 + * Fix #144 by ensuring `camel-snake-case` is properly required before use in an uberjar context. + ## Stable Builds * 1.1.610 -- 2020-10-19 diff --git a/README.md b/README.md index 50a68dc..862b476 100644 --- a/README.md +++ b/README.md @@ -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/seancorfield/next.jdbc/latest-version.svg)](https://clojars.org/seancorfield/next.jdbc) [![cljdoc badge](https://cljdoc.org/badge/seancorfield/next.jdbc?1.1.610)](https://cljdoc.org/d/seancorfield/next.jdbc/CURRENT) +[![Clojars Project](https://clojars.org/seancorfield/next.jdbc/latest-version.svg)](https://clojars.org/seancorfield/next.jdbc) [![cljdoc badge](https://cljdoc.org/badge/seancorfield/next.jdbc?1.1.613)](https://cljdoc.org/d/seancorfield/next.jdbc/CURRENT) The documentation on [cljdoc.org](https://cljdoc.org/d/seancorfield/next.jdbc/CURRENT) is for the current version of `next.jdbc`: @@ -16,7 +16,7 @@ The documentation on [cljdoc.org](https://cljdoc.org/d/seancorfield/next.jdbc/CU * [Migrating from `clojure.java.jdbc`](https://cljdoc.org/d/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/details/) 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.1.610 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. +The documentation on GitHub is for **develop** since the 1.1.613 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. 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. diff --git a/doc/getting-started.md b/doc/getting-started.md index d232f22..ee4f97f 100644 --- a/doc/getting-started.md +++ b/doc/getting-started.md @@ -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 -seancorfield/next.jdbc {:mvn/version "1.1.610"} +seancorfield/next.jdbc {:mvn/version "1.1.613"} ``` for `deps.edn` or: ```clojure -[seancorfield/next.jdbc "1.1.610"] +[seancorfield/next.jdbc "1.1.613"] ``` for `project.clj` or `build.boot`. @@ -31,7 +31,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.1"} - seancorfield/next.jdbc {:mvn/version "1.1.610"} + seancorfield/next.jdbc {:mvn/version "1.1.613"} com.h2database/h2 {:mvn/version "1.4.199"}}} ``` diff --git a/pom.xml b/pom.xml index fd85bac..d3b7f57 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 seancorfield next.jdbc - 1.1.610 + 1.1.613 next.jdbc The next generation of clojure.java.jdbc: a new low-level Clojure wrapper for JDBC-based access to databases. https://github.com/seancorfield/next-jdbc @@ -22,7 +22,7 @@ https://github.com/seancorfield/next-jdbc scm:git:git://github.com/seancorfield/next-jdbc.git scm:git:ssh://git@github.com/seancorfield/next-jdbc.git - v1.1.610 + v1.1.613 diff --git a/src/next/jdbc.clj b/src/next/jdbc.clj index 7bbbd49..c40a4fe 100644 --- a/src/next/jdbc.clj +++ b/src/next/jdbc.clj @@ -299,23 +299,23 @@ (defmacro ^:private def-snake-kebab [] (try - (let [kebab-case (requiring-resolve 'camel-snake-kebab.core/->kebab-case) - snake-case (requiring-resolve 'camel-snake-kebab.core/->snake_case)] - `(do - (def snake-kebab-opts - "A hash map of options that will convert Clojure identifiers to + (require 'camel-snake-kebab.core) + `(let [kebab-case# (requiring-resolve 'camel-snake-kebab.core/->kebab-case) + snake-case# (requiring-resolve 'camel-snake-kebab.core/->snake_case)] + (def snake-kebab-opts + "A hash map of options that will convert Clojure identifiers to snake_case SQL entities (`:table-fn`, `:column-fn`), and will convert SQL entities to qualified kebab-case Clojure identifiers (`:builder-fn`)." - {:column-fn ~snake-case :table-fn ~snake-case - :label-fn ~kebab-case :qualifier-fn ~kebab-case - :builder-fn (resolve 'next.jdbc.result-set/as-kebab-maps)}) - (def unqualified-snake-kebab-opts - "A hash map of options that will convert Clojure identifiers to + {:column-fn snake-case# :table-fn snake-case# + :label-fn kebab-case# :qualifier-fn kebab-case# + :builder-fn (resolve 'next.jdbc.result-set/as-kebab-maps)}) + (def unqualified-snake-kebab-opts + "A hash map of options that will convert Clojure identifiers to snake_case SQL entities (`:table-fn`, `:column-fn`), and will convert SQL entities to unqualified kebab-case Clojure identifiers (`:builder-fn`)." - {:column-fn ~snake-case :table-fn ~snake-case - :label-fn ~kebab-case :qualifier-fn ~kebab-case - :builder-fn (resolve 'next.jdbc.result-set/as-unqualified-kebab-maps)}))) + {:column-fn snake-case# :table-fn snake-case# + :label-fn kebab-case# :qualifier-fn kebab-case# + :builder-fn (resolve 'next.jdbc.result-set/as-unqualified-kebab-maps)})) (catch Throwable _))) (def-snake-kebab)