[gnome-db] gda_value_stringify() and sql-format strings



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]