Covalent Bond  0.0.1-alpha
'covalent bond' is a data middle office. As a 2022-2023 Fall SWE final project.
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
trivial::cbMySqlDevice Struct Referencefinal

#include <cbVirtualDevice.hpp>

Inheritance diagram for trivial::cbMySqlDevice:
Inheritance graph
[legend]
Collaboration diagram for trivial::cbMySqlDevice:
Collaboration graph
[legend]

Public Member Functions

 ~cbMySqlDevice ()
 
 cbMySqlDevice (int32_t _idx)
 
 cbMySqlDevice (int32_t _idx, const std::string &_port, const std::string &_host, const std::string &_userName, const std::string &_passWord, const std::string &_dataBaseName, const std::string &_charSet="")
 
void updateUrl () override final
 
WFMySQLTask * query (const std::string &q, const mysql_callback &callback_func=nullptr)
 
std::vector< WFMySQLTask * > sequentialQuery (const std::vector< std::string > &q, const std::vector< mysql_callback > &callback_func)
 
int32_t getIdx ()
 Get the Idx object. More...
 
- Public Member Functions inherited from trivial::cbVirtualDevice
 cbVirtualDevice ()=default
 
 cbVirtualDevice (const std::string &_port, const std::string &_host, const std::string &_userName, const std::string &_passWord, const std::string &_charSet, const std::string _dataBaseName, const virtualDeviceType &v)
 
void reloadConnection (const std::string &_port, const std::string &_host, const std::string &_userName, const std::string &_passWord, const std::string &_charSet, const std::string &_dataBaseName)
 

Static Public Member Functions

static void execMain (WFMySQLTask *t)
 User should not use this function. All task should be added to graph node in order to execute all task that follows DAG flow. THIS FUNCTION JUST FOR TEST. More...
 
static void execMain (const std::vector< WFMySQLTask * > &t)
 User should not use this function. All task should be added to graph node in order to execute all task that follows DAG flow. THIS FUNCTION JUST FOR TEST. More...
 

Private Attributes

int32_t m_idx = 0
 
WFMySQLConnection * m_conn = nullptr
 

Additional Inherited Members

- Public Attributes inherited from trivial::cbVirtualDevice
virtualDeviceType deviceType = virtualDeviceType::MySql
 
std::string port
 
std::string host
 
std::string usrName
 
std::string passWord
 
std::string charSet
 
std::string dataBaseName
 
std::string Url
 

Detailed Description

Definition at line 95 of file cbVirtualDevice.hpp.

Constructor & Destructor Documentation

◆ ~cbMySqlDevice()

trivial::cbMySqlDevice::~cbMySqlDevice ( )
inline

Definition at line 96 of file cbVirtualDevice.hpp.

References m_conn.

◆ cbMySqlDevice() [1/2]

trivial::cbMySqlDevice::cbMySqlDevice ( int32_t  _idx)
inline

Definition at line 100 of file cbVirtualDevice.hpp.

References m_conn.

◆ cbMySqlDevice() [2/2]

trivial::cbMySqlDevice::cbMySqlDevice ( int32_t  _idx,
const std::string &  _port,
const std::string &  _host,
const std::string &  _userName,
const std::string &  _passWord,
const std::string &  _dataBaseName,
const std::string &  _charSet = "" 
)
inline

Definition at line 101 of file cbVirtualDevice.hpp.

References m_conn, trivial::MySql, and trivial::cbVirtualDevice::Url.

Member Function Documentation

◆ execMain() [1/2]

void trivial::cbMySqlDevice::execMain ( const std::vector< WFMySQLTask * > &  t)
static

User should not use this function. All task should be added to graph node in order to execute all task that follows DAG flow. THIS FUNCTION JUST FOR TEST.

Parameters
t

Definition at line 53 of file cbVirtualDevice.cpp.

◆ execMain() [2/2]

void trivial::cbMySqlDevice::execMain ( WFMySQLTask *  t)
static

User should not use this function. All task should be added to graph node in order to execute all task that follows DAG flow. THIS FUNCTION JUST FOR TEST.

Parameters
t

Definition at line 51 of file cbVirtualDevice.cpp.

◆ getIdx()

int32_t trivial::cbMySqlDevice::getIdx ( )

Get the Idx object.

Returns
int32_t

Definition at line 29 of file cbVirtualDevice.cpp.

References m_idx.

◆ query()

WFMySQLTask * trivial::cbMySqlDevice::query ( const std::string &  q,
const mysql_callback callback_func = nullptr 
)
Parameters
q
callback_func
Returns
WFMySQLTask*

Definition at line 31 of file cbVirtualDevice.cpp.

References m_conn.

Referenced by cb::graph::cbVirtualDeviceNode::generateTask().

Here is the caller graph for this function:

◆ sequentialQuery()

std::vector< WFMySQLTask * > trivial::cbMySqlDevice::sequentialQuery ( const std::vector< std::string > &  q,
const std::vector< mysql_callback > &  callback_func 
)
Parameters
q
callback_func
Returns
std::vector<WFMySQLTask*>

Definition at line 35 of file cbVirtualDevice.cpp.

References m_conn.

◆ updateUrl()

void trivial::cbMySqlDevice::updateUrl ( )
finaloverridevirtual

Member Data Documentation

◆ m_conn

WFMySQLConnection* trivial::cbMySqlDevice::m_conn = nullptr
private

Definition at line 171 of file cbVirtualDevice.hpp.

Referenced by cbMySqlDevice(), query(), sequentialQuery(), updateUrl(), and ~cbMySqlDevice().

◆ m_idx

int32_t trivial::cbMySqlDevice::m_idx = 0
private

Definition at line 170 of file cbVirtualDevice.hpp.

Referenced by getIdx().


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