瀏覽代碼

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
Gabriel Horner 1 年之前
父節點
當前提交
16cfb76c9b
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      deps/common/resources/templates/config.edn

+ 4 - 3
deps/common/resources/templates/config.edn

@@ -199,9 +199,10 @@
 
 
  ;; Advanced queries `:result-transform` function.
  ;; Advanced queries `:result-transform` function.
  ;; Transform the query result before displaying it.
  ;; 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.
 ;; Queries will be displayed at the bottom of today's journal page.
 ;; Example usage:
 ;; Example usage: