From 6f33d5bde2fa3258abbf5994da1d20becfab29e2 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Sun, 12 Mar 2023 17:17:39 -0700 Subject: [PATCH] address #242 --- CHANGELOG.md | 1 + src/next/jdbc.clj | 4 ++-- src/next/jdbc/sql_logging.clj | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6973ce0..02fe453 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Only accretive/fixative changes will be made from now on. * 1.3.next in progress * Fix [#243](https://github.com/seancorfield/next-jdbc/issues/243) by ensure URI properties become keywords. + * Address [#242](https://github.com/seancorfield/next-jdbc/issues/242) by making the logging wrapper aware of the default options wrapper. * 1.3.858 -- 2023-03-05 * Address [#241](https://github.com/seancorfield/next-jdbc/issues/241) by correcting link to PostgreSQL docs. diff --git a/src/next/jdbc.clj b/src/next/jdbc.clj index ba045d6..7288021 100644 --- a/src/next/jdbc.clj +++ b/src/next/jdbc.clj @@ -1,4 +1,4 @@ -;; copyright (c) 2018-2021 Sean Corfield, all rights reserved +;; copyright (c) 2018-2023 Sean Corfield, all rights reserved (ns next.jdbc "The public API of the next generation java.jdbc library. @@ -438,7 +438,7 @@ the Datasources, Connections & Transactions section of Getting Started for more details, and some examples of use with these functions." [connectable sql-logger & [result-logger]] - (logger/->SQLLogging connectable sql-logger result-logger)) + (logger/->SQLLogging connectable sql-logger result-logger (:options connectable))) (def snake-kebab-opts "A hash map of options that will convert Clojure identifiers to diff --git a/src/next/jdbc/sql_logging.clj b/src/next/jdbc/sql_logging.clj index ef8b0f6..ef36348 100644 --- a/src/next/jdbc/sql_logging.clj +++ b/src/next/jdbc/sql_logging.clj @@ -1,4 +1,4 @@ -;; copyright (c) 2021 Sean Corfield, all rights reserved +;; copyright (c) 2021-2023 Sean Corfield, all rights reserved (ns ^:no-doc next.jdbc.sql-logging "Implementation of sql-logging logic." @@ -6,7 +6,7 @@ (set! *warn-on-reflection* true) -(defrecord SQLLogging [connectable sql-logger result-logger]) +(defrecord SQLLogging [connectable sql-logger result-logger options]) (extend-protocol p/Sourceable SQLLogging