This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-16
Channels
- # announcements (9)
- # babashka (12)
- # beginners (60)
- # biff (2)
- # calva (4)
- # cider (4)
- # clj-commons (1)
- # clj-kondo (17)
- # clojure (2)
- # clojure-europe (17)
- # clojurescript (15)
- # emacs (18)
- # exercism (5)
- # fulcro (15)
- # holy-lambda (13)
- # joyride (1)
- # lambdaisland (2)
- # malli (1)
- # nbb (3)
- # off-topic (23)
- # polylith (6)
- # portal (59)
- # releases (1)
- # squint (1)
- # tools-deps (4)
I call
(defn delete [req]
(db/delete-frog req)
(frog-results (db/frogs)))
where frog-results
will be a list of treefrogs fetched from the database. However, frog-results
(which is the HTML to be returned and swapped) includes the frog that was to be eliminated. So, in another language I’d probably put in an awkward thread sleep statement.biff/submit-tx
will block until the transaction is indexed. (if you use xt/submit-tx
, then you can call xt/await-tx
, which is what biff/submit-tx
does). after that, you need to get a fresh db value, by E.g. by calling (xt/db node)
. you can also do (:biff/db (biff/assoc-db req))
.
in this case, I would change db/frogs
so it takes the db as a parameter, then call (db/frogs (xt/db (:biff.xtdb/node req)))
.
😃 1