OmniSciDB  4201147b46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{DdlCommandExecutor.cpp}::DdlCommandDataImpl Class Reference
+ Inheritance diagram for anonymous_namespace{DdlCommandExecutor.cpp}::DdlCommandDataImpl:
+ Collaboration diagram for anonymous_namespace{DdlCommandExecutor.cpp}::DdlCommandDataImpl:

Public Member Functions

 DdlCommandDataImpl (const std::string &ddl_statement)
 
 ~DdlCommandDataImpl () override
 
const rapidjson::Value & query () const
 
const rapidjson::Value & payload () const
 
std::string commandStr () override
 
- Public Member Functions inherited from DdlCommandData
 DdlCommandData (const std::string &ddl_statement)
 
virtual ~DdlCommandData ()
 

Public Attributes

rapidjson::Document ddl_query
 

Detailed Description

Definition at line 249 of file DdlCommandExecutor.cpp.

Constructor & Destructor Documentation

anonymous_namespace{DdlCommandExecutor.cpp}::DdlCommandDataImpl::DdlCommandDataImpl ( const std::string &  ddl_statement)

Definition at line 266 of file DdlCommandExecutor.cpp.

References ddl_query.

267  : DdlCommandData(ddl_statement) {
268  ddl_query.Parse(ddl_statement);
269 }
DdlCommandData(const std::string &ddl_statement)
anonymous_namespace{DdlCommandExecutor.cpp}::DdlCommandDataImpl::~DdlCommandDataImpl ( )
override

Definition at line 271 of file DdlCommandExecutor.cpp.

271 {}

Member Function Documentation

std::string anonymous_namespace{DdlCommandExecutor.cpp}::DdlCommandDataImpl::commandStr ( )
overridevirtual

Implements DdlCommandData.

Definition at line 283 of file DdlCommandExecutor.cpp.

References ddl_query, and payload().

283  {
284  if (ddl_query.IsObject() && ddl_query.HasMember("payload") &&
285  ddl_query["payload"].IsObject()) {
286  auto& payload = ddl_query["payload"];
287  if (payload.HasMember("command") && payload["command"].IsString()) {
288  return payload["command"].GetString();
289  }
290  }
291  return "";
292 }

+ Here is the call graph for this function:

const rapidjson::Value & anonymous_namespace{DdlCommandExecutor.cpp}::DdlCommandDataImpl::payload ( ) const

Definition at line 277 of file DdlCommandExecutor.cpp.

References CHECK, and ddl_query.

Referenced by commandStr(), and anonymous_namespace{DdlCommandExecutor.cpp}::extractPayload().

277  {
278  CHECK(ddl_query.HasMember("payload"));
279  CHECK(ddl_query["payload"].IsObject());
280  return ddl_query["payload"];
281 }
#define CHECK(condition)
Definition: Logger.h:222

+ Here is the caller graph for this function:

const rapidjson::Value & anonymous_namespace{DdlCommandExecutor.cpp}::DdlCommandDataImpl::query ( ) const

Definition at line 273 of file DdlCommandExecutor.cpp.

References ddl_query.

273  {
274  return ddl_query;
275 }

Member Data Documentation

rapidjson::Document anonymous_namespace{DdlCommandExecutor.cpp}::DdlCommandDataImpl::ddl_query

Definition at line 263 of file DdlCommandExecutor.cpp.

Referenced by commandStr(), DdlCommandDataImpl(), payload(), and query().


The documentation for this class was generated from the following file: