MySQL 8.0.40
Source Code Documentation
sql_callback.h File Reference

Go to the source code of this file.

Macros

#define MYSQL_CALLBACK(OBJ, FUNC, PARAMS)
 Macro used for an internal callback. More...
 
#define MYSQL_CALLBACK_ELSE(OBJ, FUNC, PARAMS, ELSE)    (((OBJ) && ((OBJ)->FUNC)) ? (OBJ)->FUNC PARAMS : (ELSE))
 

Macro Definition Documentation

◆ MYSQL_CALLBACK

#define MYSQL_CALLBACK (   OBJ,
  FUNC,
  PARAMS 
)
Value:
do { \
if ((OBJ) && ((OBJ)->FUNC)) (OBJ)->FUNC PARAMS; \
} while (0)

Macro used for an internal callback.

The macro will check that the object exists and that the function is defined. If that is the case, it will call the function with the given parameters.

If the object or the function is not defined, the callback will be considered successful (nothing needed to be done) and will therefore return no error.

◆ MYSQL_CALLBACK_ELSE

#define MYSQL_CALLBACK_ELSE (   OBJ,
  FUNC,
  PARAMS,
  ELSE 
)     (((OBJ) && ((OBJ)->FUNC)) ? (OBJ)->FUNC PARAMS : (ELSE))