Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
sql_generator.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
*/
23
#pragma once
24
25
#include <config.h>
26
#include <cstring>
27
#include <cstdio>
28
#include <boost/program_options.hpp>
29
#include <plugin/json_server/json/json.h>
30
#include <plugin/json_server/http_handler.h>
31
32
using namespace
std
;
36
namespace
drizzle_plugin
37
{
41
namespace
json_server
42
{
46
class
SQLGenerator
47
{
48
private
:
52
Json::Value
_json_in
;
56
Json::Value
_json_out
;
60
string
_sql
;
64
const
char
*
_schema
;
68
const
char
*
_table
;
72
void
generateGetSql() ;
76
void
generatePostSql() ;
80
void
generateDeleteSql() ;
81
82
public
:
90
SQLGenerator
(
const
Json::Value
json_in,
const
char
* schema,
const
char
* table);
95
void
generateSql(
enum
evhttp_cmd_type type);
99
void
generateCreateTableSql();
104
const
string
getSQL
()
const
105
{
106
return
_sql;
107
}
108
};
109
}
110
}
drizzle_plugin::json_server::SQLGenerator::_sql
string _sql
Definition:
sql_generator.h:60
std
Json::Value
Represents a JSON value.
Definition:
value.h:149
drizzle_plugin
Definition:
auth_schema.cc:31
drizzle_plugin::json_server::SQLGenerator::_table
const char * _table
Definition:
sql_generator.h:68
drizzle_plugin::json_server::SQLGenerator::_json_out
Json::Value _json_out
Definition:
sql_generator.h:56
drizzle_plugin::json_server::SQLGenerator::getSQL
const string getSQL() const
Definition:
sql_generator.h:104
drizzle_plugin::json_server::SQLGenerator::_json_in
Json::Value _json_in
Definition:
sql_generator.h:52
drizzle_plugin::json_server::SQLGenerator::_schema
const char * _schema
Definition:
sql_generator.h:64
drizzle_plugin::json_server::SQLGenerator
Definition:
sql_generator.h:46
plugin
json_server
sql_generator.h
Generated on Thu Dec 4 2014 10:50:11 for drizzle by
1.8.8