mirror of
https://github.com/penpot/penpot.git
synced 2025-06-27 09:07:01 +02:00
🎉 Add neested transaction handling helpers (savepoints).
This commit is contained in:
parent
a783a77404
commit
046ee7e475
1 changed files with 12 additions and 0 deletions
|
@ -190,6 +190,18 @@
|
||||||
[data]
|
[data]
|
||||||
(org.postgresql.util.PGInterval. ^String 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
|
(defn interval
|
||||||
[data]
|
[data]
|
||||||
(cond
|
(cond
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue