Subject | Re: [Firebird-Architect] Exec. statement parameters |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2007-12-10T15:19:47Z |
Vlad Khorsun escreveu:
Note that I see no reason to reject such type of code:
execute block
as
begin
insert into t values (?)
end;
I.e., have parameters direct inside EXEC. BLOCK instead of need to
declare variables.
Then imagine you use colon there. You can't know if you refer to local
variable or parameter. (unless we make explicit that locals variables
have precedence)
Oracle uses this colon syntax for names parameters, but local variables
are not accessed with it.
Adriano
> ...This is one of the confusions. :-)
>
>> Named parameters is good feature, but what about the syntax in the sample, O
>> 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);
>>
>
> Hmm... now i see where confusion is. I'll look how to implement such syntax
Note that I see no reason to reject such type of code:
execute block
as
begin
insert into t values (?)
end;
I.e., have parameters direct inside EXEC. BLOCK instead of need to
declare variables.
Then imagine you use colon there. You can't know if you refer to local
variable or parameter. (unless we make explicit that locals variables
have precedence)
Oracle uses this colon syntax for names parameters, but local variables
are not accessed with it.
Adriano