change list tags to only list tags
This commit is contained in:
parent
bbeb1b6ba0
commit
e11719b40f
2 changed files with 3 additions and 2 deletions
|
|
@ -41,4 +41,5 @@
|
|||
(xt/execute-tx client [[:patch-docs :snippets (merge {:xt/id id} patch)]]))
|
||||
|
||||
(defn list-tags []
|
||||
(xt/q client '(-> (from :snippets [{:xt/id id} tags]) (unnest {:tag tags}) (without :tags) (aggregate tag {:ids (array-agg id)}))))
|
||||
;; (xt/q client '(-> (from :snippets [{:xt/id id} tags]) (unnest {:tag tags}) (without :tags) (aggregate tag {:ids (array-agg id)}))))
|
||||
(xt/q client '(-> (from :snippets [{:xt/id id} tags]) (unnest {:tag tags}) (without :tags) (aggregate tag {:count (count id)}))))
|
||||
|
|
|
|||
|
|
@ -12,4 +12,4 @@
|
|||
|
||||
(defn view-tags []
|
||||
(t/log! {:level :info} "Viewing tags")
|
||||
(map #(assoc % :count (count (:ids %))) (db/list-tags)))
|
||||
(db/list-tags))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue