On Tue, Feb 6, 2018 at 9:44 AM, Simon Slavin <slav...@bigfraud.org> wrote:

> On 6 Feb 2018, at 8:33am, Ulrich Telle <ulrich.te...@gmx.de> wrote:
> > Another possibility would be to add a user-defined function for the
> > configuration of the extension that could be called from a SELECT
> > statement:
> >
> > SELECT myextension_config('param-name', 'param-value');
> I've seen this done before.  Of course it means that your normal function
> is not deterministic,

so you may no longer use SQLITE_DETERMINISTIC .

This is in contrast to a function where parameters are set during
> compilation.

An alternative is to expose a virtual table with a fixed set of rows, and
updates on the values, which can also then be "typed" too. But that's a lot
complicated though. (and refusing inserts/deletes too, of course).

That vtable could also expose version information for the extension, for
and those would be read-only. Just thinking aloud. Avoids non-deterministic
functions. --DD
sqlite-users mailing list

Reply via email to