Kea
1.9.9-git
|
Common MySQL and Lease Data Methods. More...
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... | |
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.
|
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)".
error | Array of error elements. An element is set to MLM_TRUE if the corresponding column in the database is the source of the error. |
names | Array of column names, the same size as the error array. |
count | Size of each of the arrays. |
Definition at line 379 of file mysql_lease_mgr.cc.
References isc::db::MLM_TRUE.
|
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.
bind | Array of BIND elements |
error | Array 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. |
count | Size of each of the arrays. |
Definition at line 358 of file mysql_lease_mgr.cc.
References isc::db::MLM_FALSE.