#define afgs_not_null arg   )     (arg != NULL && strlen (arg) > 0)
 

Useful macro that allows to check if the given string reference is not null and contains a non-zero string.

This macro is mainly used to detect null or zero-valued string while creating SQL statements.

An example could be:

 CoyoteDataSet * result; 
 
 // get current element or the default (id = 10)
 result = afgs_command_execute_single_query (
                      "SELECT * FROM customer WHERE id = %s",
                      afgs_not_null (id) ? id : "10");