SNode.C
Loading...
Searching...
No Matches
database::mariadb::MariaDBCommand Class Referenceabstract

#include <MariaDBCommand.h>

Inheritance diagram for database::mariadb::MariaDBCommand:
Collaboration diagram for database::mariadb::MariaDBCommand:

Public Member Functions

 MariaDBCommand (const std::string &name, const std::function< void(const std::string &, unsigned int)> &onError)
 
virtual ~MariaDBCommand ()=default
 
const std::string & commandName ()
 
int commandStart (MYSQL *mysql, const utils::Timeval &currentTime)
 
void setMariaDBConnection (MariaDBConnection *mariaDBConnection)
 
virtual int commandContinue (int status)=0
 
virtual bool commandCompleted ()=0
 
virtual void commandError (const std::string &errorString, unsigned int errorNumber)=0
 
virtual std::string commandInfo ()
 

Protected Attributes

MYSQL * mysql = nullptr
 
const std::function< void(const std::string &, unsigned int)> onError
 

Private Member Functions

virtual int commandStart ()=0
 

Private Attributes

std::string name
 
MariaDBConnectionmariaDBConnection = nullptr
 
utils::Timeval startTime = 0
 

Detailed Description

Definition at line 66 of file MariaDBCommand.h.

Constructor & Destructor Documentation

◆ MariaDBCommand()

database::mariadb::MariaDBCommand::MariaDBCommand ( const std::string &  name,
const std::function< void(const std::string &, unsigned int)> &  onError 
)

Definition at line 51 of file MariaDBCommand.cpp.

52 : name(name)
53 , onError(onError) {
54 }
const std::function< void(const std::string &, unsigned int)> onError

References MariaDBCommand(), and name.

Referenced by MariaDBCommand().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~MariaDBCommand()

virtual database::mariadb::MariaDBCommand::~MariaDBCommand ( )
virtualdefault

Member Function Documentation

◆ commandCompleted()

◆ commandContinue()

◆ commandError()

◆ commandInfo()

◆ commandName()

const std::string & database::mariadb::MariaDBCommand::commandName ( )

Definition at line 71 of file MariaDBCommand.cpp.

71 {
72 return name;
73 }

References name.

Referenced by database::mariadb::commands::async::MariaDBConnectCommand::commandInfo(), database::mariadb::commands::async::MariaDBExecCommand::commandInfo(), and database::mariadb::commands::async::MariaDBQueryCommand::commandInfo().

Here is the caller graph for this function:

◆ commandStart() [1/2]

◆ commandStart() [2/2]

int database::mariadb::MariaDBCommand::commandStart ( MYSQL *  mysql,
const utils::Timeval currentTime 
)

Definition at line 56 of file MariaDBCommand.cpp.

56 {
57 this->mysql = mysql;
58 startTime = currentTime;
59
60 return commandStart();
61 }

References commandStart(), utils::Timeval::operator=(), and startTime.

Here is the call graph for this function:

◆ setMariaDBConnection()

void database::mariadb::MariaDBCommand::setMariaDBConnection ( MariaDBConnection mariaDBConnection)

Definition at line 63 of file MariaDBCommand.cpp.

63 {
65 }
MariaDBConnection * mariaDBConnection

References mariaDBConnection.

Member Data Documentation

◆ mariaDBConnection

MariaDBConnection* database::mariadb::MariaDBCommand::mariaDBConnection = nullptr
private

Definition at line 89 of file MariaDBCommand.h.

Referenced by setMariaDBConnection().

◆ mysql

MYSQL* database::mariadb::MariaDBCommand::mysql = nullptr
protected

Definition at line 92 of file MariaDBCommand.h.

◆ name

std::string database::mariadb::MariaDBCommand::name
private

Definition at line 87 of file MariaDBCommand.h.

Referenced by commandName(), and MariaDBCommand().

◆ onError

const std::function<void(const std::string&, unsigned int)> database::mariadb::MariaDBCommand::onError
protected

Definition at line 94 of file MariaDBCommand.h.

◆ startTime

utils::Timeval database::mariadb::MariaDBCommand::startTime = 0
private

Definition at line 97 of file MariaDBCommand.h.

Referenced by commandStart().


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