diff --git a/swift-ticketing/src/swift_ticketing/db/query.clj b/swift-ticketing/src/swift_ticketing/db/query.clj index 3bfea0a..c8fa4ac 100644 --- a/swift-ticketing/src/swift_ticketing/db/query.clj +++ b/swift-ticketing/src/swift_ticketing/db/query.clj @@ -1,15 +1,18 @@ (ns swift-ticketing.db.query (:require [next.jdbc :as jdbc] - [next.jdbc.result-set :as rs])) + [next.jdbc.result-set :as rs] + [camel-snake-kebab.core :as csk] + [camel-snake-kebab.extras :as cske])) (defn- run-query-with [f db-spec query] - (f db-spec query {:builder-fn rs/as-unqualified-maps})) + (cske/transform-keys csk/->kebab-case-keyword + (f db-spec query {:builder-fn rs/as-unqualified-maps}))) (defn run-query! [db-spec query] - (run-query-with jdbc/execute! db-spec query)) + (run-query-with jdbc/execute! db-spec query)) (defn run-query-one! [db-spec query] - (run-query-with jdbc/execute-one! db-spec query)) + (run-query-with jdbc/execute-one! db-spec query))