OmniSciDB  a5dc49c757
 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 442 of file DdlCommandExecutor.cpp.

Constructor & Destructor Documentation

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

Definition at line 459 of file DdlCommandExecutor.cpp.

References ddl_query.

460  : DdlCommandData(ddl_statement) {
461  ddl_query.Parse(ddl_statement);
462 }
DdlCommandData(const std::string &ddl_statement)
anonymous_namespace{DdlCommandExecutor.cpp}::DdlCommandDataImpl::~DdlCommandDataImpl ( )
override

Definition at line 464 of file DdlCommandExecutor.cpp.

464 {}

Member Function Documentation

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

Implements DdlCommandData.

Definition at line 476 of file DdlCommandExecutor.cpp.

References ddl_query, and payload().

476  {
477  if (ddl_query.IsObject() && ddl_query.HasMember("payload") &&
478  ddl_query["payload"].IsObject()) {
479  auto& payload = ddl_query["payload"];
480  if (payload.HasMember("command") && payload["command"].IsString()) {
481  return payload["command"].GetString();
482  }
483  }
484  return "";
485 }

+ Here is the call graph for this function:

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

Definition at line 470 of file DdlCommandExecutor.cpp.

References CHECK, and ddl_query.

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

470  {
471  CHECK(ddl_query.HasMember("payload"));
472  CHECK(ddl_query["payload"].IsObject());
473  return ddl_query["payload"];
474 }
#define CHECK(condition)
Definition: Logger.h:291

+ Here is the caller graph for this function:

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

Definition at line 466 of file DdlCommandExecutor.cpp.

References ddl_query.

466  {
467  return ddl_query;
468 }

Member Data Documentation

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

Definition at line 456 of file DdlCommandExecutor.cpp.

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


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