GDA_TYPE_NULL: GNOME Data Access 5 manual

## GDA_TYPE_NULL

Previous versions of Libgda represented SQL NULL values as a GValue completely filled with zeros (i.e. of type G_TYPE_INVALID), and GDA_TYPE_NULL was thus equivalent to G_TYPE_INVALID.

This new version introduces a new specific type for the same GDA_TYPE_NULL (which means GDA_TYPE_NULL no longer equals G_TYPE_INVALID). The most common sources of errors brought by this change are:

- if you used g_value_init() on a value of type GDA_TYPE_NULL, then you'll have to eight clear the value first, or replace that call with a call to gda_value_reset_with_type()

- the gda_g_type_from_string() function now returns G_TYPE_INVALID if it does not know how to interpret the argument, so testing the return value now also involves testing for the G_TYPE_INVALID value.

- creating a GValue using g_new0() resulted in a GDA_TYPE_NULL value, which is not longer the case; the value needs to be initialized with a call to g_value_init()

- testing for NULL values using G_IS_VALUE does not work anymore, you'll have to replace them with GDA_VALUE_HOLDS_NULL()