Subject Re: [firebird-support] Several SP parameters requested only
Author Adomas Urbanavicius
Yes, in fact this is how it done now, but as far, as engine knows what
is requested : why should app client about passing aditional args.
And by the way, I think, VIEWS work in this way.
Alexandre Benson Smith wrote:

>Adomas Urbanavicius wrote:
>
>
>
>>Hi,
>>I wonder if it is posible to know if user requested specified output in
>>SP body; or Sp knows it automatically.
>>Example :
>> SP1
>> returns A1 integer; A2 integer;
>>begin ...
>>
>>< Getting A1> ~ lets say takes ~ 2 sec to calculate
>>< Getting A2> ~ lets say takes ~ 3 sec to calculate
>>...end
>>
>>And now, I am able to write selection : select A1 from SP1, select A2
>>
>>
>>from SP1, select A1,A2 from SP1;
>
>
>>Will SP time be allways ~ 5 sec, or maybe inside SP I can somehow find
>>out is selected A1 and A2 or only A1/A2.?
>>something like :
>>if <A1 is requested> then
>> < Getting A1>
>>....
>>
>>Adomas
>>
>>
>>
>>
>Adomas,
>
>Will can branch the execution inside the SP (to do not calculate what is
>not necessary) if you pass an inout parameter saying what parameters you
>will need.
>
>you could use a Bitmap integer to represent the parameters you will
>need, there is and UDF that performs bitwise operations.
>
>see you !
>
>
>