6 #ifndef JODA_JODAQUERYREQUEST_H
7 #define JODA_JODAQUERYREQUEST_H
27 httplib::Server &server);
30 static constexpr
auto endpoint =
"/query";
32 static void query(
const httplib::Request &req, httplib::Response &res);
33 static void success_(
unsigned long result, httplib::Response &res,
35 static void export_(httplib::Response &res);
36 static void empty_(httplib::Response &res);
37 static void skipped_(httplib::Response &res);
38 static void error_(
unsigned long code, httplib::Response &res);
39 static RJDocument successDocument(
unsigned long result, int64_t size,
40 const std::string &message,
57 "A unknown error happened, check server logs for information.") {}
64 "The server skipped the query because of an error. Check logs") {}
rapidjson::GenericDocument< RJChar, RJMemoryPoolAlloc, RJBaseAlloc > RJDocument
Definition: RJFwd.h:28
Definition: Benchmark.h:27
Definition: JodaServer.h:18
Definition: JodaQueryRequest.h:45
JodaQueryException(const std::string &what)
Definition: JodaQueryRequest.h:49
JodaQueryException()
Definition: JodaQueryRequest.h:47
Definition: JodaQueryRequest.h:19
static void registerEndpoint(const std::string &prefix, httplib::Server &server)
Definition: JodaQueryRequest.cpp:14
Definition: JodaQueryRequest.h:60
JodaQuerySkippedException()
Definition: JodaQueryRequest.h:62
Definition: JodaQueryRequest.h:53
JodaQueryUnkownErrorException()
Definition: JodaQueryRequest.h:55