After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 572220 - gda_data_handler_get_sql_from_value() is unclear about quoting.
gda_data_handler_get_sql_from_value() is unclear about quoting.
Status: RESOLVED FIXED
Product: libgda
Classification: Other
Component: Client library
unspecified
Other Linux
: Normal normal
: ---
Assigned To: malerba
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-17 23:00 UTC by Murray Cumming
Modified: 2009-02-21 15:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Murray Cumming 2009-02-17 23:00:55 UTC
The documentation for gda_data_handler_get_sql_from_value() is unclear about whether the returned string will have the appropriate quoting for that column type, for that backend.

For instance, will it add '' quotes around values if the GValue is text, but no quotes if it is a number? If this function adds no quotes, is there a function that does add quotes?


http://library.gnome.org/devel/libgda/unstable/libgda-40-Default-Data-handlers.html#gda-data-handler-get-sql-from-value


By the way, where that documentation says "the returned string is NULL", it maybe means "the returned string is "NULL".
Comment 1 Murray Cumming 2009-02-18 10:21:27 UTC
In fact, it does seem to add the necessary quotes.
Comment 2 malerba 2009-02-18 16:03:55 UTC
In SVn trunk rev #3325:
- doc has been updated
- code has been modified to make sure the returned value is coherent in all
the implementations of the GdaDataHandler interface.