WIP, Remote Client/Server, fist working genre list!

This commit is contained in:
emeric
2014-05-18 23:34:34 +02:00
parent 3b7813a581
commit 0825e77abc
8 changed files with 289 additions and 123 deletions
+1
View File
@@ -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);
+5
View File
@@ -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);
}