#include <db_access.h>
Public Member Functions | |
const Json::Value | getOutputJson () const |
const Json::Value | getInputJson () const |
DBAccess (Json::Value &json_in, Json::Value &json_out, enum evhttp_cmd_type type, const char *schema, const char *table) | |
void | execute () |
Private Attributes | |
Json::Value | _json_in |
Json::Value | _json_out |
enum evhttp_cmd_type | _type |
const char * | _schema |
const char * | _table |
Facade class to parse incoming json, access database and return outgoing json.
Definition at line 44 of file db_access.h.
drizzle_plugin::json_server::DBAccess::DBAccess | ( | Json::Value & | json_in, |
Json::Value & | json_out, | ||
enum evhttp_cmd_type | type, | ||
const char * | schema, | ||
const char * | table | ||
) |
Create DBAccess instance.
json_in | a Json::Value object. |
json_out | a Json::Value object. |
type | a evttp_cmd_type enum. |
schema | a constant character pointer. |
table | a constant character pointer. |
Definition at line 30 of file db_access.cc.
void drizzle_plugin::json_server::DBAccess::execute | ( | ) |
used to execute operations via SQLGenerator, SQLExecutor and SQLToJsonGenerator.
Definition at line 39 of file db_access.cc.
References _json_in, _json_out, _schema, _table, _type, drizzle_plugin::json_server::SQLExecutor::executeSQL(), drizzle_plugin::json_server::SQLGenerator::generateCreateTableSql(), drizzle_plugin::json_server::SQLToJsonGenerator::generateJson(), drizzle_plugin::json_server::SQLGenerator::generateSql(), drizzle_plugin::json_server::SQLToJsonGenerator::generateSQLErrorJson(), drizzle_plugin::json_server::SQLExecutor::getErr(), drizzle_plugin::json_server::SQLToJsonGenerator::getJson(), and drizzle_plugin::json_server::SQLGenerator::getSQL().
Referenced by drizzle_plugin::json_server::process_json_req().
|
inline |
|
inline |
Get output json object.
Definition at line 72 of file db_access.h.
References _json_out.
Referenced by drizzle_plugin::json_server::process_json_req().
|
private |
Stores input json object.
Definition at line 50 of file db_access.h.
Referenced by DBAccess(), execute(), and getInputJson().
|
private |
Stores output json object.
Definition at line 54 of file db_access.h.
Referenced by DBAccess(), execute(), and getOutputJson().
|
private |
Stores schema being used.
Definition at line 62 of file db_access.h.
Referenced by DBAccess(), and execute().
|
private |
Stores table being used.
Definition at line 66 of file db_access.h.
Referenced by DBAccess(), and execute().
|
private |
Store type of request.
Definition at line 58 of file db_access.h.
Referenced by DBAccess(), and execute().