Re: [gnome-db] Studying the posibility to add parametrized statements
- From: Vivien Malerba <vmalerba gmail com>
- To: Jeronimo Albi <amenofisvii yahoo com ar>
- Cc: gnome-db-list <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Studying the posibility to add parametrized statements
- Date: Mon, 11 Oct 2004 09:08:22 +0200
On Sun, 10 Oct 2004 13:43:05 +0000, Jeronimo Albi
<amenofisvii yahoo com ar> wrote:
[...]
> How should i replace parameters with a token to be interpreted by
> a database engine as parameter. For example in Firebird:
>
> a. Original statement:
> SELECT name FROM table WHERE name=## [:name="User name"]
> b. Parsed statement shuld be:
> SELECT name FROM table WHERE name=?
>
> where "?" is interpreted as parameter.
The problem with the structures built by the parser is that they are
very efficient for parsing a query, but not adapted to render a
structure as a SQL statement. I don't have this problem in libmergeant
since I never use that feature (the sql_statement structure is used to
create MgQuery objects and then discarded, and then the MgQuery is
responsible to do its own rendering taking into account the real
values for the parameters).
>
> Does #sql_update_statement and #sql_delete_statement structures
> support parameters ?
>
Yes, they are supported, as for the SELECT statements; this is used in
libmergeant.
Cheers,
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]