OmniSciDB  85c2d10cdc
 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 251 of file DdlCommandExecutor.cpp.

Constructor & Destructor Documentation

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

Definition at line 268 of file DdlCommandExecutor.cpp.

References ddl_query.

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

Definition at line 273 of file DdlCommandExecutor.cpp.

273 {}

Member Function Documentation

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

Implements DdlCommandData.

Definition at line 285 of file DdlCommandExecutor.cpp.

References ddl_query, and payload().

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

+ Here is the call graph for this function:

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

Definition at line 279 of file DdlCommandExecutor.cpp.

References CHECK, and ddl_query.

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

279  {
280  CHECK(ddl_query.HasMember("payload"));
281  CHECK(ddl_query["payload"].IsObject());
282  return ddl_query["payload"];
283 }
#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 275 of file DdlCommandExecutor.cpp.

References ddl_query.

275  {
276  return ddl_query;
277 }

Member Data Documentation

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

Definition at line 265 of file DdlCommandExecutor.cpp.

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


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