Subject | Re: [Firebird-Architect] Exec. statement parameters |
---|---|
Author | Alex Peshkov |
Post date | 2007-12-10T14:14:06Z |
On Monday 10 December 2007 16:55, Dmitry Yemanov wrote:
also do not like it. If we use named parameters, it should be something like:
S = 'INSERT INTO TTT VALUES (:a, :b, :a)';
EXECUTE STATEMENT S (a=CURRENT_TRANSACTION, b=CURRENT_CONNECTION);
> Adriano,Named parameters is good feature, but what about the syntax in the sample, O
>
> > ----------
> > S = 'INSERT INTO TTT VALUES (:a, :b, :a)';
> > EXECUTE STATEMENT (:S) (CURRENT_TRANSACTION, CURRENT_CONNECTION)
> > ----------
> >
> > Three parameters, two names, and two values...
> >
> > I'm against this syntax.
>
> Are you also against the idea to implement named parameters in DSQL?
> It's the thing we've been asked for since FB1, I suppose. Yes, it means
> an API change/extension, but it does sound as a valuable feature to me.
> And, if we're going to support both question mark based unnamed and
> colon based named parameters in the future, what's wrong to have them in
> PSQL earlier?
also do not like it. If we use named parameters, it should be something like:
S = 'INSERT INTO TTT VALUES (:a, :b, :a)';
EXECUTE STATEMENT S (a=CURRENT_TRANSACTION, b=CURRENT_CONNECTION);