mirror of https://github.com/logseq/logseq
chore: remove unused :file/handle
parent
be41c8bae7
commit
dec56b31f0
|
@ -107,20 +107,16 @@
|
|||
|
||||
;; file
|
||||
:file/path {:db/unique :db.unique/identity}
|
||||
:file/content {}
|
||||
:file/created-at {}
|
||||
:file/last-modified-at {}
|
||||
;; only store the content of logseq's files
|
||||
:file/content {}
|
||||
|
||||
;; TODO: do we really use this?
|
||||
:file/handle {}
|
||||
;; :file/size {}
|
||||
:file/size {}
|
||||
})
|
||||
|
||||
(def schema-for-db-based-graph
|
||||
(merge
|
||||
(dissoc schema
|
||||
:block/namespace :block/properties-text-values :block/pre-block? :recent/pages :file/handle :block/file
|
||||
:block/namespace :block/properties-text-values :block/pre-block? :recent/pages :block/file
|
||||
:block/properties :block/properties-order :block/repeated? :block/deadline :block/scheduled :block/priority
|
||||
:block/marker :block/macros)
|
||||
{:block/name {:db/index true} ; remove db/unique for :block/name
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
[]
|
||||
(let [file-concepts (->>
|
||||
;; from logseq.db.frontend.schema
|
||||
[:block/properties-text-values :block/pre-block :recent/pages :file/handle :block/file :block/properties-order
|
||||
[:block/properties-text-values :block/pre-block :recent/pages :block/file :block/properties-order
|
||||
:block/marker :block/priority :block/scheduled :block/deadline :block/macros]
|
||||
(map str)
|
||||
(into [;; e.g. block/properties :title
|
||||
|
|
|
@ -157,8 +157,7 @@
|
|||
:size (.-size file)
|
||||
:type (.-kind (.-handle file))
|
||||
:content content
|
||||
:file/file file
|
||||
:file/handle (.-handle file)})))))))
|
||||
:file/file file})))))))
|
||||
|
||||
(defrecord ^:large-vars/cleanup-todo Nfs []
|
||||
protocol/Fs
|
||||
|
@ -345,8 +344,7 @@
|
|||
:type (.-kind (.-handle file))
|
||||
:content content
|
||||
;; expose the following, they are used by the file system
|
||||
:file/file file
|
||||
:file/handle (.-handle file)}))))
|
||||
:file/file file}))))
|
||||
files (p/all files)]
|
||||
(add-nfs-file-handle! (str "handle/" dir-name) dir-handle)
|
||||
(idb/set-item! (str "handle/" dir-name) dir-handle)
|
||||
|
|
|
@ -212,7 +212,7 @@
|
|||
(:file/content file))]
|
||||
(assoc file :file/content content)))) added-or-modified))
|
||||
(p/then (fn [result]
|
||||
(let [files (map #(dissoc % :file/file :file/handle) result)
|
||||
(let [files (map #(dissoc % :file/file) result)
|
||||
[modified-files modified] (if re-index?
|
||||
[files (set modified)]
|
||||
(let [modified-files (filter (fn [file] (contains? added-or-modified (:file/path file))) files)]
|
||||
|
|
Loading…
Reference in New Issue