[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-06 Thread James K. Lowden
On Sat, 5 Mar 2016 21:22:23 +0100 Stephan Beal wrote: > i'm not aware of any aggregates which (in normal use) take no > arguments Nondeterministic functions need not take any arguments. Built-in examples include NOW(). Your UDF could implement the Dilbert RNG:

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-06 Thread Stephan Beal
On Sat, Mar 5, 2016 at 9:22 PM, Stephan Beal wrote: > Aggregates are _currently_ modeled as a single function which gets called > just like normal function, but in the aggregate's "final" call the engine > calls the aggregate function with no arguments (this is how the call knows > it's the

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-06 Thread R Smith
On 2016/03/06 1:24 AM, Stephan Beal wrote: > On Sat, Mar 5, 2016 at 11:58 PM, Richard Hipp wrote: > >> On 3/5/16, Stephan Beal wrote: >>> On Sat, Mar 5, 2016 at 10:43 PM, Domingo Alvarez Duarte < >>> >>> The scenario i'm concerned about is that sqlite calls my aggregate N >> times, >>> then an

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-06 Thread Stephan Beal
On Sat, Mar 5, 2016 at 11:58 PM, Richard Hipp wrote: > On 3/5/16, Stephan Beal wrote: > > On Sat, Mar 5, 2016 at 10:43 PM, Domingo Alvarez Duarte < > > > > The scenario i'm concerned about is that sqlite calls my aggregate N > times, > > then an error is triggered elsewhere which keeps sqlite

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-05 Thread Stephan Beal
On Sat, Mar 5, 2016 at 11:21 PM, Stephan Beal wrote: > On Sat, Mar 5, 2016 at 10:43 PM, Domingo Alvarez Duarte < > sqlite-mail at dev.dadbiz.es> wrote: > >> Hello ! >> >> There is an user pointer that you pass and you can get it back using >> https://www.sqlite.org/c3ref/user_data.html ! >> > >

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-05 Thread Stephan Beal
On Sat, Mar 5, 2016 at 10:43 PM, Domingo Alvarez Duarte < sqlite-mail at dev.dadbiz.es> wrote: > Hello ! > > There is an user pointer that you pass and you can get it back using > https://www.sqlite.org/c3ref/user_data.html ! > i've got that, but that user data pointer is my callback function.

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-05 Thread Domingo Alvarez Duarte
Hello ! There is an user pointer that you pass and you can get it back using? https://www.sqlite.org/c3ref/user_data.html ! Cheers ! > Sat Mar 05 2016 9:22:23 pm CET CET from "Stephan Beal" > Subject: [sqlite] How does your sqlite script >binding handle aggregate

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-05 Thread Stephan Beal
Hi, all, this question is aimed at any of you who have experience adding script-defined UDF support to sqlite/script bindings (regardless of the scripting language). Everyone can tap delete now :). "i've got this friend" who has an sqlite3/script-language binding which (as of an hour or so ago)

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-05 Thread Richard Hipp
On 3/5/16, Stephan Beal wrote: > On Sat, Mar 5, 2016 at 10:43 PM, Domingo Alvarez Duarte < > > The scenario i'm concerned about is that sqlite calls my aggregate N times, > then an error is triggered elsewhere which keeps sqlite from making the > final() aggregate call. IIRC, SQLite always calls