Simplifies a lot by using cursors

This commit is contained in:
2023-10-20 00:12:42 -07:00
parent 174c428405
commit ce8fa027b2
6 changed files with 381 additions and 173 deletions

View File

@@ -117,8 +117,9 @@
(def map->db-id-decoder
{:enter (fn [x]
(into []
(for [[k v] x]
(assoc v :db/id (cond (and (string? k) (re-find #"^\d+$" k))
(for [[k v] (sort-by (comp #(Long/parseLong %) name first) x)]
v
#_(assoc v :db/id (cond (and (string? k) (re-find #"^\d+$" k))
(Long/parseLong k)
(keyword? k)
(name k)