[sqlite] Why pragma case_sensitive_like do not return the actualsetting ?

2016-04-14 Thread Domingo Alvarez Duarte
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 ?  

I have some custom collates and also I overload the "like" function for those
collates, but I didn't saw any mention on the docs about "setLikeOptFlag"
that seems to add info to help the query planner, shouldn't this also be
documented and made public ? This way third party collate/functions could
also benefit from it.  

Cheers !



[sqlite] Why pragma case_sensitive_like do not return the actualsetting ?

2016-04-14 Thread Richard Hipp
On 4/14/16, Domingo Alvarez Duarte  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