Single builtin functions that otherwise would have required two or more
separate create_function calls should have two or more corresponding
simulated entries for plain and aggregate flavors distinguishable by column
values.    max(A) aggregate and max(A,B,...) function could look something
like this:

name,builtin,aggregate,argcount
max,1,1,1
max,1,0,-1

The arg_count column would simply be the nArg supplied (or as simulated) to
sqlite3_create_function(..,int nArg,..). That is -1 for any number and 0 to
127 for specific quantity. In case of coalesce(), argcount would have to be
-1 but the description should say something about the minimum number of
arguments - case in point about the need for descriptions.

Are there other possibilities which wouldn't have a key?

Peter


On Fri, Jan 12, 2018 at 1:09 PM, Richard Hipp <d...@sqlite.org> wrote:

> On 1/12/18, petern <peter.nichvolo...@gmail.com> wrote:
> > Is adding arg_count and
> > is_aggregate columns to PRAGMA function_list() on the roadmap?
>
> How would that work with functions like coalesce() and max() that take
> an arbitrary number of arguments, or like max() that is an aggregate
> with one argument and a scalar with two or more arguments?
>
> --
> D. Richard Hipp
> d...@sqlite.org
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to