Re: [gnome-db] parameters in SQL commands
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: Gonzalo Paniagua Javier <gonzalo gnome-db org>
- Cc: GDA <gnome-db-list gnome org>
- Subject: Re: [gnome-db] parameters in SQL commands
- Date: 01 Oct 2002 21:49:03 +0200
On Tue, 2002-10-01 at 21:41, Gonzalo Paniagua Javier wrote:
>
> >
> > Of course, if those statements are stored on the server (as Gonzalo said,
> > for performance and also data consistency (business rules) reasons) then the
> > syntax is defined by the DBMS itself. The role of the providers is then to
> > provide a facility for the client to define those parameter values, not to
> > parse the SQL statement and replace parameter names by values.
>
> For providers that supports preparing statements, they have to translate
> our representation of the paramenters (ie, :name or [name] or whatever
> we choose) to the representation that their backend uses, then
> 'register' the prepared statement and reuse it on every query.
>
> For the rest, we have to follow the slow path: the provider must
> substitute the parameter placeholders by the parameter values to create
> each statement for every query.
>
ok, so we'll do that. I'm gonna start by adding a
gda_replace_placeholders or whatever function to do the simple
replacement in providers that don't support prepared statements. Then,
we'll have to add support to manage the parameter list in each provider.
For the providers that do support prepared statements, the issue is as
Gonzalo says: translate the libgda placeholders to the DBMS' ones, and
PREPARE a statement.
cheers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]