13#define DUMP_RESPONSE() Log::trace("DUMP_RESPONSE: {}", response.dump())
44 std::optional<json>
read(
const std::string&
id,
const json& opts)
override;
46 bool remove(
const std::string&
id,
const json& opts)
override;
47 std::vector<json>
list(
const json& opts)
override;
50 bool itemExists(
const std::string&
tableName,
const std::string&
id)
const;
Class to manage tables metadata like access rules, name, etc.
Definition sys_tables.h:24
bool setupRoutes() override
Definition sys_tables.cpp:22
std::optional< json > read(const std::string &id, const json &opts) override
Definition sys_tables_crud.cpp:238
void authWithEmailAndPassword(const Request &req, Response &res, Context &ctx) override
Definition sys_tables.cpp:515
bool hasAccess(const Request &req, Response &res, Context &ctx) override
Definition sys_tables.cpp:659
void updateRecord(const Request &req, Response &res, Context &ctx) override
Definition sys_tables.cpp:392
bool remove(const std::string &id, const json &opts) override
Definition sys_tables_crud.cpp:698
json create(const json &entity, const json &opts) override
Definition sys_tables_crud.cpp:23
void deleteRecord(const Request &req, Response &res, Context &ctx) override
Definition sys_tables.cpp:471
void fetchRecords(const Request &req, Response &res, Context &ctx) override
Definition sys_tables.cpp:222
void createRecord(const Request &req, Response &res, Context &ctx) override
Definition sys_tables.cpp:258
std::vector< json > list(const json &opts) override
Definition sys_tables_crud.cpp:733
void fetchRecord(const Request &req, Response &res, Context &ctx) override
Definition sys_tables.cpp:158
~SysTablesUnit() override=default
json update(const std::string &id, const json &entity, const json &opts) override
Definition sys_tables_crud.cpp:265
Class to model the behaviour of a table in database.
Definition tables.h:31
std::string tableName()
Definition tables.cpp:63
std::string tableId()
Definition tables.cpp:73
std::string tableType()
Definition tables.cpp:83
router.h
Definition app.h:30
nlohmann::json json
Shorten JSON namespace.
Definition crud.h:14
httplib::Response Response
Shorthand for httplib::Response
Definition http.h:121
httplib::Request Request
Shorthand for httplib::Request
Definition http.h:118