Re: [sqlite] LIKE operator and collations

2019-02-15 Thread Shawn Wagner
Look into using the ICU extension. If you're compiling sqlite yourself, just define SQLITE_ENABLE_ICU to 1 (And link with the ICU libraries), otherwise you'll have to grab the source and compile it as a loadable module. https://www3.sqlite.org/cgi/src/dir?ci=03c4f00317233a34=ext/icu for details.

Re: [sqlite] LIKE operator and collations

2019-02-15 Thread Simon Slavin
You can write your own LIKE function and use that: If you have the source for "collate TURKISH_CI" then you might be able to use it in your own function. Simon. ___ sqlite-users mailing list

[sqlite] LIKE operator and collations

2019-02-15 Thread Aydin Ozgur Yagmur
Hello, I want to use custom collations for "like" and "not equals" queries. *select * from tbl_internal where col_internal like 'ç%' collate TURKISH_CI;* it is ok for "equals" operator. *select * from tbl_internal where col_internal = 'çç' collate TURKISH_CI;* but not ok, for "like" and "not

Re: [sqlite] Index on expression optimization

2019-02-15 Thread Richard Hipp
On 2/15/19, Rowan Worth wrote: > On Fri, 15 Feb 2019 at 16:13, Wout Mertens wrote: > >> sqlite> create index b on t(b) where b is not null; >> sqlite> explain query plan select b from t where b is not null; >> QUERY PLAN >> `--SCAN TABLE t USING COVERING INDEX b >> sqlite> explain query plan

Re: [sqlite] Index on expression optimization

2019-02-15 Thread Rowan Worth
On Fri, 15 Feb 2019 at 16:13, Wout Mertens wrote: > sqlite> create index b on t(b) where b is not null; > sqlite> explain query plan select b from t where b is not null; > QUERY PLAN > `--SCAN TABLE t USING COVERING INDEX b > sqlite> explain query plan select b from t where (b is not null)=1; >

[sqlite] Index on expression optimization

2019-02-15 Thread Wout Mertens
Hi, I wonder if the following optimization would be easy to do: sqlite> create table t(a,b); sqlite> create index a on t(a); sqlite> explain query plan select a from t where a is not null; QUERY PLAN `--SCAN TABLE t USING COVERING INDEX a sqlite> explain query plan select a from t where (a is