[gnome-db] gda_value_stringify() and sql-format strings
- From: Murray Cumming <murrayc murrayc com>
- To: gnome-db-list <gnome-db-list gnome org>
- Subject: [gnome-db] gda_value_stringify() and sql-format strings
- Date: Fri, 11 Jun 2004 14:56:20 +0200
These issues might be connected, so I'll mention them in the same email:
1. The docs for gda_value_stringify() say "Returns : a string formatted
according to the printf() style indicated in the preceding table.". But
there is no "preceding table" in the docs, and no format string in the
list of arguments. gda_value_stringify() seems to return a text
representation based on the locale, so it is useful for displaying the
text, but not useful for putting in a SQL statement.
2. Maybe we should have a gda_value_to_sql_string() functin which would
return the text representation of the value as needed by SQL statements.
It would
2.1 Add quotes if necessary - for instance, around text, dates, times,
etc, but not around numbers.
2.2 Escape special characters, such as quotes.
2.3 Format numbers, dates, and times according to the C locale, ISO-
standard, or whatever SQL needs.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]