Add helper function for reading values by field name
The helper function provides map-like access to row values. This is used to retrieve the values for all MariaDB 10.0+ versions as there are differences in the returned results between 10.1 and 10.2.
This commit is contained in:
@ -66,6 +66,17 @@ int mxs_mysql_query(MYSQL* conn, const char* query);
|
||||
*/
|
||||
bool mxs_mysql_trim_quotes(char *s);
|
||||
|
||||
/**
|
||||
* Helper function for getting values by field name
|
||||
*
|
||||
* @param result Resultset
|
||||
* @param row Row where the value is read
|
||||
* @param key Name of the field
|
||||
*
|
||||
* @return The value of the field or NULL if value is not found. NULL values
|
||||
* are also returned as NULL pointers.
|
||||
*/
|
||||
const char* mxs_mysql_get_value(MYSQL_RES* result, MYSQL_ROW row, const char* key);
|
||||
|
||||
typedef enum mxs_pcre_quote_approach
|
||||
{
|
||||
|
Reference in New Issue
Block a user