DataHandler.getSqlFromValue

string getSqlFromValue(gobject.value.Value value = null)

Creates a new string which is an SQL representation of the given value, the returned string can be used directly in an SQL statement. For example if value is a G_TYPE_STRING, then the returned string will be correctly quoted. Note however that it is a better practice to use variables in statements instead of value literals, see the <link linkend="GdaSqlParser.description">GdaSqlParser</link> for more information.

If the value is NULL or is of type GDA_TYPE_NULL, or is a G_TYPE_STRING and [gobject.value.Value.getString] returns null, the returned string is "NULL".

Parameters

valuethe value to be converted to a string, or null

Returns

the new string, or null if an error occurred