Re: [gnome-db] libgda escape_value() and schema retreival
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: Murray Cumming <murrayc murrayc com>
- Cc: GDA <gnome-db-list gnome org>
- Subject: Re: [gnome-db] libgda escape_value() and schema retreival
- Date: Sat, 25 Sep 2004 14:05:56 +0200
On Tue, 2004-08-17 at 11:43 +0200, Murray Cumming wrote:
> This seems to add a function like this:
>
> gboolean
> gda_connection_escape_string (GdaConnection *cnc,
> gchar *from,
> const gchar *to,
> unsigned long length)
>
I've changed it to be:
> gda_connection_escape_string (GdaConnection *cnc,
> const gchar *from,
> gchar *to)
> 1. Why do we need to provide the length of the "from" string? Surely, all
> strings in libgda are null-terminated?
>
> 2. It seems to convert from "to" to "from". Isn't that a bit backwards?
>
yes, the arguments were wrong.
> 3. Is this just for creating SQL-representations of text values? Surely
> it's more useful to have a funciton to create a SQL representation of a
> GValue, whatever type that GValue has.
>
indeed, I guess we should convert this function to be escape_value, and
have it work for any GdaValue. I'll leave it for now with the fixes, but
Alan, could you please convert the function to be escape_value instead
of escape_string?
--
Rodrigo Moya <rodrigo gnome-db org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]