summaryrefslogtreecommitdiff
path: root/src/database/database.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/database.hpp')
-rw-r--r--src/database/database.hpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/database/database.hpp b/src/database/database.hpp
index fb62c34..9c483f4 100644
--- a/src/database/database.hpp
+++ b/src/database/database.hpp
@@ -23,6 +23,7 @@ class Database
public:
using time_point = std::chrono::system_clock::time_point;
struct RecordNotFound: public std::exception {};
+ enum class Paging { first, last };
struct Uuid: Column<std::string> { static constexpr auto name = "uuid_"; };
@@ -125,14 +126,9 @@ class Database
*/
static std::vector<MucLogLine> get_muc_logs(const std::string& owner, const std::string& chan_name, const std::string& server,
int limit=-1, const std::string& start="", const std::string& end="",
- const Id::real_type after_id=Id::unset_value);
+ const Id::real_type after_id=Id::unset_value, Paging=Paging::first);
/**
- * Get the most recent messages from the archive, with optional limit and start date
- */
- static std::vector<MucLogLine> get_muc_most_recent_logs(const std::string& owner, const std::string& chan_name, const std::string& server,
- int limit=-1, const std::string& start="");
- /**
* Get just one single record matching the given uuid, between (optional) end and start.
* If it does not exist (or is not between end and start), throw a RecordNotFound exception.
*/