|
drogon
C++14/17-based HTTP application framework
|
this class is a helper class for the implementation of restful api controllers generated by the drogon_ctl command. More...
#include <drogon/orm/RestfulController.h>


Public Member Functions | |
| void | enableMasquerading (const std::vector< std::string > &pMasqueradingVector) |
| void | disableMasquerading () |
| void | registerAJsonValidator (const std::string &fieldName, const std::function< bool(const Json::Value &, std::string &)> &validator) |
| void | registerAJsonValidator (const std::string &fieldName, std::function< bool(const Json::Value &, std::string &)> &&validator) |
| orm::Criteria | makeCriteria (const Json::Value &pJson) noexcept(false) |
| make a criteria object for searching by ORM. | |
this class is a helper class for the implementation of restful api controllers generated by the drogon_ctl command.
| orm::Criteria drogon::RestfulController::makeCriteria | ( | const Json::Value & | pJson | ) |
make a criteria object for searching by ORM.
| pJson | the json object presenting search criteria. The json object must be an array of depth 3. for example: [ [ ["color","=","red"], //AND ["price","<",1000] ], //OR [ ["color","=","white"], //AND ["price","<",800], //AND ["brand","!=",null] ] ] |