[sqlite] What's the best way to pass function information to virtual table?

2015-06-23 Thread Mike Nicolino
to generate and return '0' for it if not present in the where clause. This is all somewhat hacky of course and non-standard if you're exposing SQL to users. MikeN -Original Message- From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailing

[sqlite] What's the best way to pass function information to virtual table?

2015-06-23 Thread Jerry
r to my > _MatchFilter' arrangement to cause '_Average' to generate and return '0' > for it if not present in the where clause. > > This is all somewhat hacky of course and non-standard if you're exposing > SQL to users. > > MikeN > > &g

[sqlite] What's the best way to pass function information to virtual table?

2015-06-23 Thread Clemens Ladisch
Jerry wrote: > Assuming I want to compute the average value of all keys, how to write the > query for this using match? > > For example, if I write SQL in this way > >> SELECT avg(key) From table WHERE key MATCH('avg'); > > with MATCH info, the virtual table is able to know the query is looking for

[sqlite] What's the best way to pass function information to virtual table?

2015-06-22 Thread Jerry
t; > -Original Message- > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto: > sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Clemens Ladisch > Sent: Wednesday, June 17, 2015 1:23 AM > To: sqlite-users at mailinglists.sqlite.org > Subject: Re: [sqlite] What's t

[sqlite] What's the best way to pass function information to virtual table?

2015-06-20 Thread Clemens Ladisch
Jerry wrote: > 2015-06-17 1:23 GMT-07:00 Clemens Ladisch : >> Jerry wrote: >>> But it seems only general functions can be override -- it has not effect on >>> aggregate functions. >> >> The virtual table interface does not allow access to all the internals >> of the query optimizer. >> >> When ther

[sqlite] What's the best way to pass function information to virtual table?

2015-06-18 Thread Jerry
; -Original Message- > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto: > sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Clemens Ladisch > Sent: Wednesday, June 17, 2015 1:23 AM > To: sqlite-users at mailinglists.sqlite.org > Subject: Re: [s

[sqlite] What's the best way to pass function information to virtual table?

2015-06-18 Thread Jerry
Thanks, Clemens. Some of my comments as follows 2015-06-17 1:23 GMT-07:00 Clemens Ladisch : > Jerry wrote: > > With xBestIndex and xFilter, we can pass the constraint information > (e.g., > > those from WHERE clause) to virtual table (through struct > > sqlite3_index_info), so that we can locate

[sqlite] What's the best way to pass function information to virtual table?

2015-06-17 Thread Mike Nicolino
disch Sent: Wednesday, June 17, 2015 1:23 AM To: sqlite-users at mailinglists.sqlite.org Subject: Re: [sqlite] What's the best way to pass function information to virtual table? Jerry wrote: > With xBestIndex and xFilter, we can pass the constraint information > (e.g., those from WHERE cla

[sqlite] What's the best way to pass function information to virtual table?

2015-06-17 Thread Clemens Ladisch
Jerry wrote: > With xBestIndex and xFilter, we can pass the constraint information (e.g., > those from WHERE clause) to virtual table (through struct > sqlite3_index_info), so that we can locate the cursor to narrow the search > space. > However, it does not provide information about functions used

[sqlite] What's the best way to pass function information to virtual table?

2015-06-16 Thread Jerry
Hi, I am working on sqlite+rocksdb, i.e., using rocksdb as the back-end using sqlite virtual table. With xBestIndex and xFilter, we can pass the constraint information (e.g., those from WHERE clause) to virtual table (through struct sqlite3_index_info), so that we can locate the cursor to narrow t