Subject | Re: [Firebird-Architect] Exec. statement parameters |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2007-12-11T00:17Z |
Vlad Khorsun wrote:
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.
Adriano
>> Vlad Khorsun escreveu:Unnamed parameters is easier to write. Thanks to TYPE OF COLUMN, current
>>
>>> ...
>>>
>>>
>>>> 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
>>>
>> 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.
>
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.
Adriano