瀏覽代碼

fix: datascript upsert db/ident

Tienson Qin 1 年之前
父節點
當前提交
db8d0c53df
共有 4 個文件被更改,包括 5 次插入5 次删除
  1. 1 1
      deps.edn
  2. 1 1
      deps/db/deps.edn
  3. 1 1
      deps/outliner/deps.edn
  4. 2 2
      src/main/logseq/api.cljs

+ 1 - 1
deps.edn

@@ -4,7 +4,7 @@
   rum/rum                               {:mvn/version "0.12.9"}
 
   datascript/datascript                 {:git/url "https://github.com/logseq/datascript" ;; fork
-                                         :sha     "aa2f963be5d507b55d05c4d9a6ee3ce9454c4415"}
+                                         :sha     "2df1f148059373a92bc4f388895ec8416a776ead"}
 
   datascript-transit/datascript-transit {:mvn/version "0.3.0"}
   borkdude/rewrite-edn                  {:mvn/version "0.4.7"}

+ 1 - 1
deps/db/deps.edn

@@ -1,7 +1,7 @@
 {:deps
  ;; External deps should be kept in sync with https://github.com/logseq/nbb-logseq/blob/main/bb.edn
  {datascript/datascript {:git/url "https://github.com/logseq/datascript" ;; fork
-                         :sha     "aa2f963be5d507b55d05c4d9a6ee3ce9454c4415"}
+                         :sha     "2df1f148059373a92bc4f388895ec8416a776ead"}
   datascript-transit/datascript-transit {:mvn/version "0.3.0"
                                          :exclusions [datascript/datascript]}
   cljs-bean/cljs-bean         {:mvn/version "1.5.0"}

+ 1 - 1
deps/outliner/deps.edn

@@ -1,7 +1,7 @@
 {:deps
  ;; External deps should be kept in sync with https://github.com/logseq/nbb-logseq/blob/main/bb.edn
  {datascript/datascript {:git/url "https://github.com/logseq/datascript" ;; fork
-                         :sha     "aa2f963be5d507b55d05c4d9a6ee3ce9454c4415"}
+                         :sha     "2df1f148059373a92bc4f388895ec8416a776ead"}
   logseq/db             {:local/root "../db"}
   logseq/graph-parser   {:local/root "../db"}
   com.cognitect/transit-cljs {:mvn/version "0.8.280"}

+ 2 - 2
src/main/logseq/api.cljs

@@ -808,14 +808,14 @@
   (fn [block-uuid key]
     (p/let [block-uuid (sdk-utils/uuid-or-throw-error block-uuid)
             _ (db-async/<get-block (state/get-current-repo) block-uuid :children? false)]
-      (when-let [block (db-model/query-block-by-uuid block-uuid)]
+      (when-let [block (db-model/get-block-by-uuid block-uuid)]
         (pu/lookup-by-name (:block/properties block) key)))))
 
 (def ^:export get_block_properties
   (fn [block-uuid]
     (p/let [block-uuid (sdk-utils/uuid-or-throw-error block-uuid)
             _ (db-async/<get-block (state/get-current-repo) block-uuid :children? false)]
-      (when-let [block (db-model/query-block-by-uuid block-uuid)]
+      (when-let [block (db-model/get-block-by-uuid block-uuid)]
         (let [properties (if (config/db-based-graph? (state/get-current-repo))
                            (db-pu/readable-properties (:block/properties block))
                            (:block/properties block))]