Kea 2.5.5
isc::dhcp::MySqlLeaseExchange Class Reference

Common MySQL and Lease Data Methods. More...

+ Inheritance diagram for isc::dhcp::MySqlLeaseExchange:

Static Public Member Functions

static std::string getColumnsInError (my_bool *error, std::string *names, size_t count)
 Return columns in error. More...
static void setErrorIndicators (MYSQL_BIND *bind, my_bool *error, size_t count)
 Set error indicators. More...

Detailed Description

Common MySQL and Lease Data Methods.

The MySqlLease4Exchange and MySqlLease6Exchange classes provide the functionality to set up binding information between variables in the program and data extracted from the database. This class is the common base to both of them, containing some common methods.

Definition at line 568 of file

Member Function Documentation

◆ getColumnsInError()

static std::string isc::dhcp::MySqlLeaseExchange::getColumnsInError ( my_bool error,
std::string *  names,
size_t  count 

Return columns in error.

If an error is returned from a fetch (in particular, a truncated status), this method can be called to get the names of the fields in error. It returns a string comprising the names of the fields separated by commas. In the case of there being no error indicators set, it returns the string "(None)".

errorArray of error elements. An element is set to MLM_TRUE if the corresponding column in the database is the source of the error.
namesArray of column names, the same size as the error array.
countSize of each of the arrays.

Definition at line 603 of file

References isc::db::error, and isc::db::MLM_TRUE.

Referenced by isc::dhcp::MySqlLease4Exchange::getErrorColumns(), and isc::dhcp::MySqlLease6Exchange::getErrorColumns().

◆ setErrorIndicators()

static void isc::dhcp::MySqlLeaseExchange::setErrorIndicators ( MYSQL_BIND *  bind,
my_bool error,
size_t  count 

Set error indicators.

Sets the error indicator for each of the MYSQL_BIND elements. It points the "error" field within an element of the input array to the corresponding element of the passed error array.

bindArray of BIND elements
errorArray of error elements. If there is an error in getting data associated with one of the "bind" elements, the corresponding element in the error array is set to MLM_TRUE.
countSize of each of the arrays.

Definition at line 582 of file

References isc::db::error, and isc::db::MLM_FALSE.

Referenced by isc::dhcp::MySqlLease4Exchange::createBindForReceive(), isc::dhcp::MySqlLease6Exchange::createBindForReceive(), isc::dhcp::MySqlLease4Exchange::createBindForSend(), and isc::dhcp::MySqlLease6Exchange::createBindForSend().

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