Is there a good way to create functions in sqlite where you can insure that 
your function callback will be called in order? 

The api currently has support for purely functional functions and result 
set aggregates, but neither require that their respective callbacks are 
called in sort order (ORDER BY).  

The built in aggregate avg() function works on entire result set and so it 
doesn't matter if it receives rows 'out of order' (say in respect to time), 
but a moving average function would need to maintain a window period, e.g. 
ordered set of previous rows -- to work properly.

Is there a way of insuring such an order with minimal impact on query 
optimization that is not a total hack that completely circumvents the 
sqlite execution pipeline? 

For example: as a compromise, I could live with a robust, single-threaded 
build that would insure the ordered calls to my custom function callback. 

I suspect there is no palatable fix, but I'd appreciate getting 
confirmation from someone with a better grasp of the internals :)

Thanks in advance,

john
 

    
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to