drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzle_plugin::json_server Namespace Reference

Classes

class  DBAccess
class  Schema
class  JsonErrorArea
class  HttpHandler
class  HTTPServer
class  JsonHandler
class  FileDescriptor
class  WakeupPipe
class  JsonWorker
class  JsonServer
class  SQLExecutor
class  SQLGenerator
class  SQLToJsonGenerator

Typedefs

typedef std::shared_ptr< struct event_base > event_base_ptr
typedef std::shared_ptr< struct evhttp > evhttp_ptr
typedef std::shared_ptr< JsonWorker > JsonWorkerPtr

Functions

bool updateSchema (Session *, set_var *var)
bool updateTable (Session *, set_var *var)
void updateMaxThreads (Session *, sql_var_t)
static in_port_t getPort (void)
void process_request (struct evhttp_request *req, void *)
void process_root_request (struct evhttp_request *req, void *)
void process_api01_version_req (struct evhttp_request *req, void *)
void process_version_req (struct evhttp_request *req, void *)
void process_sql_req (struct evhttp_request *req, void *)
void process_json_req (struct evhttp_request *req, void *)
void process_json_ddl_schema_create_req (struct evhttp_request *req, void *)
void process_json_ddl_schema_drop_req (struct evhttp_request *req, void *)
static void shutdown_event (int, short, void *arg)
static void run (struct event_base *base)
static int json_server_init (drizzled::module::Context &context)
static void init_options (drizzled::module::option_context &context)

Variables

static const string DEFAULT_SCHEMA = "test"
static const string DEFAULT_TABLE = ""
static const string JSON_SERVER_VERSION = "0.3"
static const uint32_t DEFAULT_MAX_THREADS = 32
static const bool DEFAULT_ALLOW_DROP_TABLE =false
bool allow_drop_table
string default_schema
string default_table
uint32_t max_threads
uint32_t clone_max_threads =0
static port_constraint port
JsonServer * server =NULL

Detailed Description

Json Server Plugin namespace

Json Server Plugin Namespace

Typedef Documentation

◆ event_base_ptr

typedef std::shared_ptr<struct event_base> drizzle_plugin::json_server::event_base_ptr

Definition at line 559 of file json_server.cc.

◆ evhttp_ptr

typedef std::shared_ptr<struct evhttp> drizzle_plugin::json_server::evhttp_ptr

Definition at line 560 of file json_server.cc.

◆ JsonWorkerPtr

typedef std::shared_ptr<JsonWorker> drizzle_plugin::json_server::JsonWorkerPtr

Definition at line 647 of file json_server.cc.

Function Documentation

◆ getPort()

in_port_t drizzle_plugin::json_server::getPort ( void )
static

Definition at line 92 of file json_server.cc.

◆ init_options()

void drizzle_plugin::json_server::init_options ( drizzled::module::option_context & context)
static

Definition at line 780 of file json_server.cc.

◆ json_server_init()

int drizzle_plugin::json_server::json_server_init ( drizzled::module::Context & context)
static

Definition at line 758 of file json_server.cc.

◆ process_api01_version_req()

void drizzle_plugin::json_server::process_api01_version_req ( struct evhttp_request * req,
void *  )

Definition at line 230 of file json_server.cc.

◆ process_json_ddl_schema_create_req()

void drizzle_plugin::json_server::process_json_ddl_schema_create_req ( struct evhttp_request * req,
void *  )

Transform a HTTP Request for create schema and returns results based on the input json.

Parameters
reqa HTTP request parameter,

Definition at line 374 of file json_server.cc.

◆ process_json_ddl_schema_drop_req()

void drizzle_plugin::json_server::process_json_ddl_schema_drop_req ( struct evhttp_request * req,
void *  )

Transform a HTTP Request for create schema and returns results based on the input json.

Parameters
reqa HTTP request parameter.

Definition at line 421 of file json_server.cc.

◆ process_json_req()

void drizzle_plugin::json_server::process_json_req ( struct evhttp_request * req,
void *  )

Transform a HTTP request for sql transaction and return results based on input json document.

Todo
allow DBA to set whether to use strict mode for parsing json (should get rid of white space), especially for POST of course.
Parameters
reqshould contain a "table" parameter in request uri. "query", "_id" and "schema" are optional.

Definition at line 331 of file json_server.cc.

◆ process_request()

void drizzle_plugin::json_server::process_request ( struct evhttp_request * req,
void *  )

Definition at line 105 of file json_server.cc.

◆ process_root_request()

void drizzle_plugin::json_server::process_root_request ( struct evhttp_request * req,
void *  )

Definition at line 113 of file json_server.cc.

◆ process_sql_req()

void drizzle_plugin::json_server::process_sql_req ( struct evhttp_request * req,
void *  )

Definition at line 261 of file json_server.cc.

◆ process_version_req()

void drizzle_plugin::json_server::process_version_req ( struct evhttp_request * req,
void *  )

Definition at line 245 of file json_server.cc.

◆ run()

void drizzle_plugin::json_server::run ( struct event_base * base)
static

Definition at line 471 of file json_server.cc.

◆ shutdown_event()

void drizzle_plugin::json_server::shutdown_event ( int ,
short ,
void * arg )
static

Definition at line 465 of file json_server.cc.

◆ updateMaxThreads()

void drizzle_plugin::json_server::updateMaxThreads ( Session * ,
sql_var_t  )

Definition at line 714 of file json_server.cc.

◆ updateSchema()

bool drizzle_plugin::json_server::updateSchema ( Session * ,
set_var * var )

Definition at line 739 of file json_server.cc.

◆ updateTable()

bool drizzle_plugin::json_server::updateTable ( Session * ,
set_var * var )

Definition at line 751 of file json_server.cc.

Variable Documentation

◆ allow_drop_table

bool drizzle_plugin::json_server::allow_drop_table

Definition at line 82 of file json_server.cc.

◆ clone_max_threads

uint32_t drizzle_plugin::json_server::clone_max_threads =0

Definition at line 86 of file json_server.cc.

◆ DEFAULT_ALLOW_DROP_TABLE

const bool drizzle_plugin::json_server::DEFAULT_ALLOW_DROP_TABLE =false
static

Definition at line 81 of file json_server.cc.

◆ DEFAULT_MAX_THREADS

const uint32_t drizzle_plugin::json_server::DEFAULT_MAX_THREADS = 32
static

Definition at line 80 of file json_server.cc.

◆ DEFAULT_SCHEMA

const string drizzle_plugin::json_server::DEFAULT_SCHEMA = "test"
static

Definition at line 77 of file json_server.cc.

◆ default_schema

string drizzle_plugin::json_server::default_schema

Definition at line 83 of file json_server.cc.

◆ DEFAULT_TABLE

const string drizzle_plugin::json_server::DEFAULT_TABLE = ""
static

Definition at line 78 of file json_server.cc.

◆ default_table

string drizzle_plugin::json_server::default_table

Definition at line 84 of file json_server.cc.

◆ JSON_SERVER_VERSION

const string drizzle_plugin::json_server::JSON_SERVER_VERSION = "0.3"
static

Definition at line 79 of file json_server.cc.

◆ max_threads

uint32_t drizzle_plugin::json_server::max_threads

Definition at line 85 of file json_server.cc.

◆ port

port_constraint drizzle_plugin::json_server::port
static

Definition at line 90 of file json_server.cc.

◆ server

JsonServer* drizzle_plugin::json_server::server =NULL

Definition at line 712 of file json_server.cc.