Kea  1.9.9-git
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 344 of file mysql_lease_mgr.cc.

Member Function Documentation

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

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)".

Parameters
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 379 of file mysql_lease_mgr.cc.

References isc::db::MLM_TRUE.

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

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.

Parameters
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 358 of file mysql_lease_mgr.cc.

References isc::db::MLM_FALSE.


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