This commit is contained in:
2023-10-26 15:54:41 -07:00
parent 8c3d792b28
commit 5ed23f26be
13 changed files with 37 additions and 100 deletions

View File

@@ -31,12 +31,8 @@
~@rest))
(defmacro with-field-default [field default & rest]
`(let [next-cursor# (get *current* ~field )
next-cursor# (if (nil? @next-cursor#)
(cursor/update! next-cursor# default)
next-cursor#)]
(with-cursor next-cursor#
~@rest)))
`(with-cursor (get *current* ~field ~default)
~@rest))
(defn field-name