mirror of https://github.com/logseq/logseq
fix: should only log query when debug is enabled
parent
2b94a95f11
commit
d271b85a51
|
@ -539,7 +539,6 @@ Some bindings in this fn:
|
|||
result (if (coll? (first where))
|
||||
(apply conj q where)
|
||||
(conj q where))]
|
||||
(prn "Datascript query: " result)
|
||||
result))
|
||||
|
||||
(defn query
|
||||
|
|
|
@ -124,7 +124,8 @@
|
|||
|
||||
(defn react-query
|
||||
[repo {:keys [query inputs rules] :as query'} query-opts]
|
||||
(let [pprint (if config/dev? (fn [_] nil) debug/pprint)]
|
||||
(let [pprint (if config/dev? debug/pprint (fn [_] nil))
|
||||
start-time (.now js/performance)]
|
||||
(pprint "================")
|
||||
(pprint "Use the following to debug your datalog queries:")
|
||||
(pprint query')
|
||||
|
@ -137,4 +138,5 @@
|
|||
k [:custom query']]
|
||||
(pprint "inputs (post-resolution):" resolved-inputs)
|
||||
(pprint "query-opts:" query-opts)
|
||||
(pprint (str "time elapsed: " (.toFixed (- (.now js/performance) start-time) 2) "ms"))
|
||||
(apply react/q repo k query-opts query inputs))))
|
||||
|
|
Loading…
Reference in New Issue