On Apr 14, 2016 5:46 AM, "Domingo Alvarez Duarte" <sqlite-mail at dev.dadbiz.es>
wrote:
>
> So there is a way to have a callback that intercept pragmas ?
>
> Because if we make a piece of derived/composed software that can be used
by
> third party how to maintain our overloads/overwrites ?

Since SQLite swaps like/glob functions, it seems the simple fix is to not
use that pragma for custom like/glob functions. Communicate the case
sensitivity status through some other channel, or have two versions of the
functions that vary based on case sensitivity and replace based on current
needs instead of calling the pragma.

>
> Cheers !
> >  Thu Apr 14 2016 01:21:08 PM CEST from "Richard Hipp" <drh at sqlite.org>
> >Subject: Re: [sqlite] Why pragma case_sensitive_like do not return
> >theactualsetting ?
> >
> >  On 4/14/16, Domingo Alvarez Duarte <sqlite-mail at dev.dadbiz.es> wrote:
> >
> >>Also I'm noticing that when the "pragma case_sensitive_like" is executed
> >> there is two internal functions
> >> "sqlite3RegisterLikeFunctions/setLikeOptFlag"
> >> been called to swap the built-in LIKE and GLOB functions.
> >>
> >> What this mean for user installed collates/functions overloading ?
> >>
>
> >  From the docs: "This pragma uses sqlite3_create_function() to
> > overload the LIKE and GLOB functions, which may override previous
> > implementations of LIKE and GLOB registered by the application."
> >
> > So if you register your own LIKE and GLOB functions and then invoke the
> > "case_sensitive_like" pragma, your private LIKE and GLOB functions are
> > replaced by one of the built-in LIKE or GLOB implementations.
> >
> >
> > --
> > D. Richard Hipp
> > drh at sqlite.org
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users at mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> >
> >
>
>
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to