Hello !
I did some tests to see how the json* functions behave when we specify
collation to the column that stores it and it seems that the json* functions
ignore the collation completely, is that by design or is it a forgotten
implementation ?
_______
CREATE TABLE a(j collate nocase);
INSERT INTO a values('"blue"'), ('"Blue"'), ('{"a":"blue","B":"BLUE"}');
SELECT 'select *',* FROM a;
SELECT 'j = ''"bLue"''',* FROM a WHERE j = '"bLue"';
SELECT 'j LIKE ''%bLue%''',* FROM a WHERE j LIKE '%bLue%';
SELECT 'json_extract(j, ''$'')', json_extract(j, '$') AS jstr FROM a;
SELECT json_extract(j, '$') AS jstr FROM a WHERE jstr = 'bLue'; -- I was
expecting collation to propagate here
SELECT json_extract(j, '$.a') AS jstr FROM a;
SELECT json_extract(j, '$.b') AS jstr FROM a; -- I was expecting $.B to match
$.b due to collation nocase here
_______
Cheers !
> Fri Sep 11 2015 5:58:36 pm CEST CEST from "Richard Hipp" <drh at sqlite.org>
>Subject: [sqlite] Feedback request: JSON support in SQLite
>
> Draft documentation for the current design of JSON support in SQLite
> can be seen on-line at
>
> https://www.sqlite.org/draft/json1.html
>
> Your feedback is encouraged.
>
> All features described in the document above are implemented and
> working in the latest trunk version of SQLite, which you can download
> in source-code form from https://www.sqlite.org/src/timeline?y=ci and
> compile yourself using instructions found at
> https://www.sqlite.org/src/doc/trunk/README.md
>
> --
> 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
>
>
>
?