Improve snapshot related internal API

This commit also adds the ability to take snapshot of all files
of the team in a single run/transaction.
This commit is contained in:
Andrey Antukh 2024-02-08 15:21:31 +01:00 committed by Andrés Moya
parent aaf457a792
commit 6d35cb2eb4
7 changed files with 433 additions and 286 deletions

View file

@ -285,8 +285,9 @@
file)))
(defn get-minimal-file
[{:keys [::db/pool] :as cfg} id]
(db/get pool :file {:id id} {:columns [:id :modified-at :revn]}))
[cfg id & {:as opts}]
(let [opts (assoc opts ::sql/columns [:id :modified-at :revn])]
(db/get cfg :file {:id id} opts)))
(defn get-file-etag
[{:keys [::rpc/profile-id]} {:keys [modified-at revn]}]