0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-18 10:41:29 -05:00

🎉 Add neested transaction handling helpers (savepoints).

This commit is contained in:
Andrey Antukh 2020-10-20 17:29:29 +02:00 committed by Hirunatan
parent a783a77404
commit 046ee7e475

View file

@ -190,6 +190,18 @@
[data]
(org.postgresql.util.PGInterval. ^String data))
(defn savepoint
([^Connection conn]
(.setSavepoint conn))
([^Connection conn label]
(.setSavepoint conn (name label))))
(defn rollback!
([^Connection conn]
(.rollback conn))
([^Connection conn ^Savepoint sp]
(.rollback conn sp)))
(defn interval
[data]
(cond