OmniSciDB  bf83d84833
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 ()
 
const rapidjson::Value & query () const
 
const rapidjson::Value & payload () const
 
virtual 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 250 of file DdlCommandExecutor.cpp.

Constructor & Destructor Documentation

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

Definition at line 267 of file DdlCommandExecutor.cpp.

References ddl_query.

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

Definition at line 272 of file DdlCommandExecutor.cpp.

272 {}

Member Function Documentation

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

Implements DdlCommandData.

Definition at line 284 of file DdlCommandExecutor.cpp.

References ddl_query, and payload().

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

+ Here is the call graph for this function:

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

Definition at line 278 of file DdlCommandExecutor.cpp.

References CHECK, and ddl_query.

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

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

+ Here is the caller graph for this function:

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

Definition at line 274 of file DdlCommandExecutor.cpp.

References ddl_query.

274  {
275  return ddl_query;
276 }

Member Data Documentation

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

Definition at line 264 of file DdlCommandExecutor.cpp.

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


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