This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-28
Channels
- # babashka (29)
- # beginners (179)
- # bristol-clojurians (1)
- # calva (9)
- # chlorine-clover (47)
- # cider (57)
- # clj-kondo (1)
- # cljs-dev (13)
- # clojure (241)
- # clojure-europe (9)
- # clojure-nl (4)
- # clojure-norway (88)
- # clojure-spec (4)
- # clojure-uk (15)
- # clojurescript (211)
- # clojutre (1)
- # community-development (8)
- # core-async (1)
- # datomic (31)
- # figwheel-main (33)
- # fulcro (29)
- # ghostwheel (6)
- # graalvm (11)
- # graphql (12)
- # instaparse (4)
- # jobs (1)
- # jobs-discuss (17)
- # leiningen (7)
- # malli (6)
- # meander (38)
- # off-topic (208)
- # onyx (6)
- # re-frame (23)
- # reagent (8)
- # shadow-cljs (61)
- # spacemacs (10)
- # sql (5)
- # yada (5)
Hello I'm trying to write some test-fixtures to run my app and rollback after the test but I'm getting: ERROR: ROLLBACK TO SAVEPOINT can only be used in transaction blocks
If it's really not possible, I would ask at least some more info about transaction blocks (and how they compose)
https://gist.github.com/souenzzo/2783a30bc8d5b904a7b1e0ecf8cbe082
Transactions cannot be nested.
You're also trying to stand up two overlapping transactions on a single connection which cannot work.
Connections are auto-commit by default so single SQL operations do not need to be wrapped in a transaction -- you only need a (single) transaction wrapped around a group of SQL operations that you need to be atomically committed (or rolled back).