Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
(ns honeysql.extensions.returning
[honeysql.format :as f]
[honeysql.helpers :as h]))
(defmethod f/format-clause :returning [[_ fields] _]
(str "RETURNING " (f/comma-join (map f/to-sql fields))))
(f/register-clause! :returning 225)
(h/defhelper returning [m fields]
(assoc m :returning (h/collify fields)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.