From df22bed0724b3a0d04c9fefd0f5bb130945a6b4e Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 12 Jul 2023 10:36:06 +1000 Subject: Include title in indexes to avoid a per-record disk read GOTTA GO FAST --- src/database/include/database.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/database/include') diff --git a/src/database/include/database.hpp b/src/database/include/database.hpp index 7ffc15b0..f7e44299 100644 --- a/src/database/include/database.hpp +++ b/src/database/include/database.hpp @@ -70,16 +70,17 @@ class Result { class IndexRecord { public: - explicit IndexRecord(const IndexKey&, std::optional); + explicit IndexRecord(const IndexKey&, std::optional, std::optional); auto text() const -> std::optional; - auto track() const -> std::optional; + auto track() const -> std::optional; auto Expand(std::size_t) const -> std::optional>; private: IndexKey key_; - std::optional track_; + std::optional override_text_; + std::optional track_; }; class Database { -- cgit v1.2.3