[sqlite] A question about sqlite3_get_auxdata()/sqlite3_set_auxdata().

2016-02-09 Thread Peter Aronson
I had written code that I thought should cache the repeated user function arguments used in a SQL statement generally like so: SELECT a.id FROM a,b WHERE MyFunc(a.data,b.data); But to my surprise, even though I was saving my (parsed and processed) arguments using at the end of my function impleme

[sqlite] A question about sqlite3_get_auxdata()/sqlite3_set_auxdata().

2016-02-09 Thread Richard Hipp
On 2/9/16, Peter Aronson wrote: > So, why *isn't* metadata preserved between function calls for data values? Because the database value will likely change, rendering the metadata obsolete. The metadata is only preserved when the value is a constant. That mechanism is intended for operators like