Thanks for the answer !  

How hard would be to implement something like that ?  

O maybe a function called "expand" that would return the expanded wildcard
parameters ?  

Ex: select json_array(expand(*)) as json from one_table;  

Ex2 inside a trigger: select raise("Something is not right here !") where
my_generic_trigger_function(trigger.type, new.*, old.*) = 1;  

For triggers would be nice to have a metadata parameter maybe called
"trigger" with info about "table name", "field name", "before/after/instead
insert/update/delete".  

?  

Maybe now with this new "table-valued functions" we can have an easier way to
emulate "create function", it seems that we can somehow pass parameters and
retrieve variable number of columns.


I always miss something like this mainly on triggers to make generic user
defined functions.  

Anyone have any idea about this ?  

?  

Cheers !  

?  
>  Sat Aug 22 2015 13:01:32 CEST from "Richard Hipp" <drh at sqlite.org> 
>Subject: Re: [sqlite] There is any reason to sqlite not expand "*" in
>function calls ?
>
>  On 8/22/15, sqlite-mail <sqlite-mail at dev.dadbiz.es> wrote:
> 
>  
>>Then I tried with some custom functions accepting variable number of
>> parameters and realize that "*" is not expanded for function calls.
>> 
>> There is any reason for it or it's a forgotten implementation ?
>> 
>> 

>  Well, one reason is that "somefunction(*)" does not expand the "*" to
> a list of all columns in any other function in any other SQL database
> engine, that I am aware of. That behavior is without precedent.
> 
> -- 
> D. Richard Hipp
> drh at sqlite.org
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 
>
>  



?

Reply via email to