Added minor utility func
This commit is contained in:
@@ -107,6 +107,12 @@ TrackList::getById(Session& session, IdType id)
|
|||||||
return session.getDboSession().find<TrackList>().where("id = ?").bind(id);
|
return session.getDboSession().find<TrackList>().where("id = ?").bind(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
TrackList::isEmpty() const
|
||||||
|
{
|
||||||
|
return _entries.empty();
|
||||||
|
}
|
||||||
|
|
||||||
std::size_t
|
std::size_t
|
||||||
TrackList::getCount() const
|
TrackList::getCount() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ class TrackList : public Wt::Dbo::Dbo<TrackList>
|
|||||||
void clear() { _entries.clear(); }
|
void clear() { _entries.clear(); }
|
||||||
|
|
||||||
// Get tracks, ordered by position
|
// Get tracks, ordered by position
|
||||||
|
bool isEmpty() const;
|
||||||
std::size_t getCount() const;
|
std::size_t getCount() const;
|
||||||
Wt::Dbo::ptr<TrackListEntry> getEntry(std::size_t pos) const;
|
Wt::Dbo::ptr<TrackListEntry> getEntry(std::size_t pos) const;
|
||||||
std::vector<Wt::Dbo::ptr<TrackListEntry>> getEntries(std::optional<std::size_t> offset = {}, std::optional<std::size_t> size = {}) const;
|
std::vector<Wt::Dbo::ptr<TrackListEntry>> getEntries(std::optional<std::size_t> offset = {}, std::optional<std::size_t> size = {}) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user