summaryrefslogtreecommitdiff
path: root/src/database/include/database.hpp
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2023-07-08 12:58:07 +1000
committerailurux <ailuruxx@gmail.com>2023-07-08 12:58:07 +1000
commit3de310f6e4c170c4c4bfb789cb07ca10e5ab17b8 (patch)
tree0d13d6efa758b8c029a35c73405529dcadde3788 /src/database/include/database.hpp
parentdaa3013836d619d920db3a9dc1f9cc988047a4b4 (diff)
parent8f8bc1f088b389a683735d626cbce9adb1f6dc17 (diff)
downloadtangara-fw-3de310f6e4c170c4c4bfb789cb07ca10e5ab17b8.tar.gz
Merge branch 'main' of git.sr.ht:~jacqueline/tangara-fw
Diffstat (limited to 'src/database/include/database.hpp')
-rw-r--r--src/database/include/database.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/database/include/database.hpp b/src/database/include/database.hpp
index 77a17b75..7ffc15b0 100644
--- a/src/database/include/database.hpp
+++ b/src/database/include/database.hpp
@@ -100,6 +100,15 @@ class Database {
auto GetTrackPath(TrackId id) -> std::future<std::optional<std::string>>;
+ auto GetTrack(TrackId id) -> std::future<std::optional<Track>>;
+
+ /*
+ * Fetches data for multiple tracks more efficiently than multiple calls to
+ * GetTrack.
+ */
+ auto GetBulkTracks(std::vector<TrackId> id)
+ -> std::future<std::vector<std::optional<Track>>>;
+
auto GetIndexes() -> std::vector<IndexInfo>;
auto GetTracksByIndex(const IndexInfo& index, std::size_t page_size)
-> std::future<Result<IndexRecord>*>;