diff --git a/src/main/frontend/components/class.cljs b/src/main/frontend/components/class.cljs index 8b69b85f4..312226141 100644 --- a/src/main/frontend/components/class.cljs +++ b/src/main/frontend/components/class.cljs @@ -7,8 +7,7 @@ [frontend.ui :as ui] [rum.core :as rum] [frontend.components.block :as block] - [logseq.shui.ui :as shui] - [logseq.db.frontend.property :as db-property])) + [logseq.shui.ui :as shui])) (rum/defc class-select [page class on-select] diff --git a/src/main/frontend/db/conn.cljs b/src/main/frontend/db/conn.cljs index 7f8d69d59..35612ec7a 100644 --- a/src/main/frontend/db/conn.cljs +++ b/src/main/frontend/db/conn.cljs @@ -73,12 +73,6 @@ [repo] (swap! conns dissoc (datascript-db repo))) -(defn kv - [key value & {:keys [id]}] - {:db/id (or id -1) - :db/ident key - key value}) - (if util/node-test? (defn transact! ([repo tx-data] diff --git a/src/main/frontend/db/model.cljs b/src/main/frontend/db/model.cljs index 9a7955091..de9187992 100644 --- a/src/main/frontend/db/model.cljs +++ b/src/main/frontend/db/model.cljs @@ -768,13 +768,6 @@ independent of format as format specific heading characters are stripped" {:id (str uuid) :nonce (:nonce shape)})))))) -(defn get-all-properties - [repo] - (when-let [db (conn/get-db repo)] - (->> (d/datoms db :avet :block/type "property") - (map (fn [d] - (d/entity db (:e d))))))) - (defn get-all-classes [repo] (d/q diff --git a/src/main/logseq/api.cljs b/src/main/logseq/api.cljs index d7329bb03..5a7036851 100644 --- a/src/main/logseq/api.cljs +++ b/src/main/logseq/api.cljs @@ -29,9 +29,8 @@ [frontend.handler.plugin :as plugin-handler] [frontend.handler.common.plugin :as plugin-common-handler] [frontend.handler.property :as property-handler] - [frontend.handler.property.util :as pu] [frontend.handler.db-based.property.util :as db-pu] - [frontend.handler.db-based.property :as db-p] + [frontend.handler.db-based.property :as db-property-handler] [logseq.outliner.core :as outliner-core] [frontend.modules.outliner.tree :as outliner-tree] [frontend.handler.command-palette :as palette-handler] @@ -53,7 +52,7 @@ [logseq.api.block :as api-block] [logseq.db :as ldb] [logseq.db.frontend.property.util :as db-property-util] - [logseq.db.frontend.property :as ldb-property])) + [logseq.db.frontend.property :as db-property])) ;; Alert: this namespace shouldn't invoke any reactive queries @@ -797,8 +796,8 @@ _ (db-async/ (if (keyword? key) (name key) key) (util/safe-lower-case)) - key (if db? (ldb-property/create-user-property-ident-from-name key) key) - _ (when db? (db-p/upsert-property! key {} {}))] + key (if db? (db-property/create-user-property-ident-from-name key) key) + _ (when db? (db-property-handler/upsert-property! key {} {}))] (property-handler/set-block-property! repo block-uuid key value)))) (def ^:export remove_block_property @@ -808,7 +807,7 @@ db? (config/db-based-graph? (state/get-current-repo)) key-ns? (and (keyword? key) (namespace key)) key (if key-ns? key (-> (if (keyword? key) (name key) key) (util/safe-lower-case))) - key (if (and db? (not key-ns?)) (ldb-property/create-user-property-ident-from-name key) key)] + key (if (and db? (not key-ns?)) (db-property/create-user-property-ident-from-name key) key)] (property-handler/remove-block-property! (state/get-current-repo) block-uuid key))))