Re: [gnome-db] gda_value_stringify() and sql-format strings
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: Murray Cumming <murrayc murrayc com>
- Cc: GDA <gnome-db-list gnome org>
- Subject: Re: [gnome-db] gda_value_stringify() and sql-format strings
- Date: Mon, 19 Jul 2004 12:28:33 +0200
On Fri, 2004-06-11 at 14:56 +0200, Murray Cumming wrote:
> 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.
>
yes, that sounds good. Could someone provide a patch for it please? :)
As I said before, API freeze is pretty soon, so we should add all the
new stuff ASAP.
cheers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]