From 2086ab09b8d89c27f524d82a68b9a2035ea02436 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 24 Oct 2023 16:29:46 +1100 Subject: Implement incremental updates of database indexes This makes rescanning the library *so* much faster. Yay! --- src/database/include/database.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/database/include/database.hpp') diff --git a/src/database/include/database.hpp b/src/database/include/database.hpp index 7cb1d09c..cdf69db0 100644 --- a/src/database/include/database.hpp +++ b/src/database/include/database.hpp @@ -7,6 +7,7 @@ #pragma once #include +#include #include #include #include @@ -150,6 +151,11 @@ class Database { auto dbPutHash(const uint64_t& hash, TrackId i) -> void; auto dbGetHash(const uint64_t& hash) -> std::optional; auto dbCreateIndexesForTrack(const Track& track) -> void; + auto dbRemoveIndexes(std::shared_ptr) -> void; + auto dbIngestTagHashes(const TrackTags&, + std::pmr::unordered_map&) -> void; + auto dbRecoverTagsFromHashes(const std::pmr::unordered_map&) + -> std::shared_ptr; template auto dbGetPage(const Continuation& c) -> Result*; -- cgit v1.2.3