Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix hooks issue
  • Loading branch information
ibarrick committed Sep 17, 2019
commit 08081a855281ee721dfc7ed842cb6962313c29ea
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject org.batch/yesql "0.6.8"
(defproject org.batch/yesql "0.6.9"
:description "A Clojure library for using SQL"
:url "https://github.com/krisajenkins/yesql"
:license {:name "Eclipse Public License"
Expand Down
2 changes: 1 addition & 1 deletion src/yesql/generate.clj
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
["No database connection supplied to function '%s',"
"Check the docs, and supply {:connection ...} as an option to the function call, or globally to the defquery declaration."])
name))
(cond (and (= insert-handler jdbc-fn) (:hooks query-options) @(:hooks (:before-insert query-options)))
(cond (and (= insert-handler jdbc-fn) (:hooks query-options) (:before-insert @(:hooks query-options)))
((:before-insert @(:hooks query-options)) args statement call-options)
(and (= execute-handler jdbc-fn) (:hooks query-options) (= "delete" (lower-case (first (split (trim statement) #" ")))) (:before-delete @(:hooks query-options)))
((:before-delete @(:hooks query-options)) args statement call-options)
Expand Down