fix: update :query/result-transforms to work with db graphs

since they are the future. Leave example disabled by default as it's
not important to have :sort-by-priority enabled by default and working
for both file and db graphs
experiment/tanstack-table
Gabriel Horner 2024-06-10 12:38:40 -04:00
parent 575558e169
commit 16cfb76c9b
1 changed files with 4 additions and 3 deletions

View File

@ -199,9 +199,10 @@
;; Advanced queries `:result-transform` function.
;; Transform the query result before displaying it.
:query/result-transforms
{:sort-by-priority
(fn [result] (sort-by (fn [h] (get h :block/priority "Z")) result))}
;; Example usage for DB graphs:
;; :query/result-transforms
;; {:sort-by-priority
;; (fn [result] (sort-by (fn [h] (get h :logseq.task/priority "Z")) result))}
;; Queries will be displayed at the bottom of today's journal page.
;; Example usage: