Skip to content

Commit

Permalink
feat: adds extra args on db execute
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeldelboni committed Aug 1, 2023
1 parent 83b8989 commit 066e892
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/parenthesin/components/db/jdbc_hikari.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
(:import (com.zaxxer.hikari HikariDataSource)))

(defprotocol DatabaseProvider
(execute [self command]
(execute [self sql-params]
[self sql-params opts]
"Low-level API to execute a command in the database"))

(defrecord Database [config ^HikariDataSource datasource]
Expand All @@ -26,8 +27,10 @@
this))

DatabaseProvider
(execute [this commands]
(jdbc/execute! (:datasource this) commands)))
(execute [this sql-params]
(jdbc/execute! (:datasource this) sql-params))
(execute [this sql-params opts]
(jdbc/execute! (:datasource this) sql-params opts)))

(defn new-database []
(map->Database {}))

0 comments on commit 066e892

Please sign in to comment.