3 ms·
Example using the json1 extension: BEGIN TRANSACTION; CREATE TABLE json_tbl(id integer primary key, json text collate nocase); CREATE VIEW json_tbl_view AS
by mingodad 11y ago
Example using the json1 extension:
BEGIN TRANSACTION;
CREATE TABLE json_tbl(id integer primary key, json text collate nocase);
CREATE VIEW json_tbl_view AS
SELECT id, json_extract(json, '$.value') AS val
FROM json_tbl;
CREATE INDEX json_tbl_idx on json_tbl(json_extract(json, '$.value'));
EXPLAIN QUERY PLAN SELECT * FROM json_tbl_view WHERE 'the_value_33' = val;
COMMIT;