mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 17:36:33 +00:00
fix: large graph creation having blank and incorrect block counts
large graph chunking assumed a certain tx order which isn't guaranteed. There are also some edge cases where blocks could get separated from each other which are now fixed. Also fixed a bug with validating user properties and made small enhancement for query script
This commit is contained in:
6
deps/db/script/query.cljs
vendored
6
deps/db/script/query.cljs
vendored
@@ -34,8 +34,10 @@
|
||||
(update :block/properties (fn [props] (map (fn [m] (into {} m)) props)))))
|
||||
(drop 2 args))
|
||||
;; assumes no :in are in queries
|
||||
(let [query (into (edn/read-string query*) [:in '$ '%])]
|
||||
(mapv first (d/q query @conn (rules/extract-rules rules/db-query-dsl-rules)))))]
|
||||
(let [query (into (edn/read-string query*) [:in '$ '%])
|
||||
res (d/q query @conn (rules/extract-rules rules/db-query-dsl-rules))]
|
||||
;; Remove nesting for most queries which just have one :find binding
|
||||
(if (= 1 (count (first res))) (mapv first res) res)))]
|
||||
(when ((set args) "-v") (println "DB contains" (count (d/datoms @conn :eavt)) "datoms"))
|
||||
(prn results)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user