diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-07-12 10:36:06 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-07-12 10:36:06 +1000 |
| commit | df22bed0724b3a0d04c9fefd0f5bb130945a6b4e (patch) | |
| tree | 919ad6d6dcb611aa5cb1710efd9425655caf8960 /src/database/include | |
| parent | 67ab8bf5153f9391b8b728bc932ea8414e18c511 (diff) | |
| download | tangara-fw-df22bed0724b3a0d04c9fefd0f5bb130945a6b4e.tar.gz | |
Include title in indexes to avoid a per-record disk read
GOTTA GO FAST
Diffstat (limited to 'src/database/include')
| -rw-r--r-- | src/database/include/database.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<Track>); + explicit IndexRecord(const IndexKey&, std::optional<shared_string>, std::optional<TrackId>); auto text() const -> std::optional<shared_string>; - auto track() const -> std::optional<Track>; + auto track() const -> std::optional<TrackId>; auto Expand(std::size_t) const -> std::optional<Continuation<IndexRecord>>; private: IndexKey key_; - std::optional<Track> track_; + std::optional<shared_string> override_text_; + std::optional<TrackId> track_; }; class Database { |
