WIP, Remote Client/Server, fist working genre list!
This commit is contained in:
@@ -99,6 +99,7 @@ class Genre
|
||||
// Find utility
|
||||
static pointer getByName(Wt::Dbo::Session& session, const std::string& name);
|
||||
static pointer getNone(Wt::Dbo::Session& session);
|
||||
static Wt::Dbo::collection<pointer> getAll(Wt::Dbo::Session& session, std::size_t offset, std::size_t size);
|
||||
|
||||
// Create utility
|
||||
static pointer create(Wt::Dbo::Session& session, const std::string& name);
|
||||
|
||||
@@ -39,3 +39,8 @@ Genre::create(Wt::Dbo::Session& session, const std::string& name)
|
||||
return session.add(new Genre(name));
|
||||
}
|
||||
|
||||
Wt::Dbo::collection<Genre::pointer>
|
||||
Genre::getAll(Wt::Dbo::Session& session, std::size_t offset, std::size_t size)
|
||||
{
|
||||
return session.find<Genre>().offset(offset).limit(size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user