Drizzled Public API Documentation

db_access.h
1 /* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3  *
4  * Copyright (C) 2012 Mohit Srivastava
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
25 #include <config.h>
26 #include <plugin/json_server/json/json.h>
27 #include <plugin/json_server/sql_generator.h>
28 #include <plugin/json_server/sql_executor.h>
29 #include <plugin/json_server/sql_to_json_generator.h>
30 #include <plugin/json_server/http_handler.h>
34 namespace drizzle_plugin
35 {
39 namespace json_server
40 {
44  class DBAccess
45  {
46  private:
58  enum evhttp_cmd_type _type;
62  const char* _schema;
66  const char* _table;
67 
68  public:
72  const Json::Value getOutputJson() const
73  {
74  return _json_out;
75  }
79  const Json::Value getInputJson() const
80  {
81  return _json_in;
82  }
92  DBAccess(Json::Value &json_in,Json::Value& json_out,enum evhttp_cmd_type type,const char* schema,const char* table);
96  void execute();
97 
98  };
99 }
100 }
const Json::Value getOutputJson() const
Definition: db_access.h:72
Represents a JSON value.
Definition: value.h:149
DBAccess(Json::Value &json_in, Json::Value &json_out, enum evhttp_cmd_type type, const char *schema, const char *table)
Definition: db_access.cc:30
const Json::Value getInputJson() const
Definition: db_access.h:79