mirror of https://github.com/logseq/logseq
enhance: allow query function to fallback to named properties with :result-transform
parent
358987d7b3
commit
19be2850ff
|
@ -50,7 +50,9 @@
|
|||
int? (some integer? vals)
|
||||
repo (state/get-current-repo)
|
||||
prop-key (if (config/db-based-graph? repo)
|
||||
(:block/uuid (db/entity repo [:block/name (gp-util/page-name-sanity-lc (name f))]))
|
||||
(or (:block/uuid (db/entity repo [:block/name (gp-util/page-name-sanity-lc (name f))]))
|
||||
;; Fall back to the keyword for queries that set named properties through :result-transform
|
||||
f)
|
||||
f)]
|
||||
`(~'fn [~'b]
|
||||
(~'let [~'result-str (~'get-in ~'b [:block/properties ~prop-key])
|
||||
|
|
Loading…
Reference in New Issue