GNOME Bugzilla – Bug 103230
New functions to escape/unescape binary data
Last modified: 2009-01-28 08:41:55 UTC
We should provide a couple of functions that escape/unescape binary data for inclusion in values of queries. All providers that need escaping should implement them.
There is the gda_connection_value_to_sql_string() function which converts any GdaValue to a valid SQL string, which fills the purpose of encoding binary data. As for data decoding, it is automatically done when retreiving GdaBinary values. However I think there could be a nice improvement by creating an extra function which does just the opposite of the gda_connection_value_to_sql_string() function: take a SQL string as input and output a new GdaValue (the good point would be that the GdaValue type is determined by the string only). That would really be a nice thing to have for libgnomedb. What do you think?
What would be the point of sql_string_to_value()? When would anybody need to use it?
Closing the bug. Feel free to reopen it if needed.