fix: entity-util/{journal?,whiteboard?,page?} calls

Split up fns of these checks into entity-util, file-entity-util and
common-entity-util so that we have explicit fns for checking in single
or multi-graph contexts. By doing this, were were able to fix more than
20+ fns that were calling general fns in a single graph context e.g.
checking for :block/type in DB graph only namespaces. Some of these
calls were happening on every :block/title lookup so there may be
some perf enhancements
This commit is contained in:
Gabriel Horner
2025-02-19 12:06:06 -05:00
parent 0964331b8a
commit e92b107b5b
15 changed files with 89 additions and 54 deletions

View File

@@ -77,7 +77,9 @@
(defn- validate-multi-graph-fns-not-in-file-or-db
[]
(let [multi-graph-fns ["config/db-based-graph\\?" "sqlite-util/db-based-graph\\?"]
(let [multi-graph-fns ["config/db-based-graph\\?" "sqlite-util/db-based-graph\\?"
;; Use file-entity-util and entity-util when in a single graph context
"ldb/whiteboard\\?" "ldb/journal\\?" "ldb/page\\?"]
res (apply shell {:out :string :continue true}
"git grep -E" (str "(" (string/join "|" multi-graph-fns) ")")
(into file-graph-paths db-graph-paths))]