3 ms·
Indeed the docs are very confusing but I think what it's saying is it uses sqlite3_create_function to replace the "default" implementation of LIKE (which calls
by masklinn 3y ago
Indeed the docs are very confusing but I think what it's saying is it uses sqlite3_create_function to replace the "default" implementation of LIKE (which calls the like function: https://www.sqlite.org/lang_corefunc.html#like https://www.sqlite.org/lang_corefunc.html#like).
It might be mentioning GLOB because it also resets its function (to the default https://www.sqlite.org/lang_corefunc.html#glob https://www.sqlite.org/lang_corefunc.html#glob) so a client which installed its own glob() function would get an odd behaviour. I can't say I understand why it resets glob though.
From looking at archive.org, until 2011 the doc said:
> This pragma only works if the built-in like() SQL function has not been overloaded using sqlite3_create_function().
then in mid 2011 it changes to
> 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.
but the only changelog entry about case_sensitive_like before then was its introduction back in 2005. 3.0.6 beta (september 2004) does indicate
> Combine the implementations of LIKE and GLOB into a single pattern-matching subroutine.
but the link still seems debatable, surely overriding glob() does not normally change the behaviour of like(), it's only the default impls which are shared?
Anyway if someone wants to code-dive sqlite, that's an open question.