Subject Re: [Firebird-Architect] Exec. statement parameters
Author Adriano dos Santos Fernandes
Vlad Khorsun wrote:
>> Vlad Khorsun escreveu:
>>> ...
>>>> 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)';
>>> Hmm... now i see where confusion is. I'll look how to implement such syntax
>> This is one of the confusions. :-)
>> 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.
> EXEC BLOCK was created looking at stored procedures. I believe it have
> good syntax and it not needs to be changed. Explicitly named parameters
> always better than implicit unnamed ones, i believe.
Unnamed parameters is easier to write. Thanks to TYPE OF COLUMN, current
EXECUTE BLOCK syntax may be less tedious, as one doesn't need to know
columns types to replicate in the parameters type.

And unnamed parameters may also look like named ones, if you put it
after variable declaration.