diff options
author | louiz’ <louiz@louiz.org> | 2018-02-13 03:10:00 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-02-13 03:10:00 +0100 |
commit | fd7c365288b9c4db1d441b553d42b26e81715b36 (patch) | |
tree | ebd99e3af5ccffd605a65c5446c6d7deec9dd872 /src/database/database.hpp | |
parent | fd9c7139386e773ee64fe970089d77fede75181f (diff) | |
download | biboumi-fd7c365288b9c4db1d441b553d42b26e81715b36.tar.gz biboumi-fd7c365288b9c4db1d441b553d42b26e81715b36.tar.bz2 biboumi-fd7c365288b9c4db1d441b553d42b26e81715b36.tar.xz biboumi-fd7c365288b9c4db1d441b553d42b26e81715b36.zip |
Use the same function for both history orders
Diffstat (limited to 'src/database/database.hpp')
-rw-r--r-- | src/database/database.hpp | 8 |
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. */ |