mirror of
https://github.com/tursodatabase/libsql.git
synced 2024-11-23 15:36:17 +00:00
9ed72eb5ae
This merges the version-3.45.1 tag from upstream SQLite git repository to libSQL with the following conflicts resolved: Conflicts: README.md ext/jni/src/org/sqlite/jni/capi/ConfigSqllogCallback.java libsql-sqlite3/configure libsql-sqlite3/doc/jsonb.md libsql-sqlite3/ext/fts5/test/fts5faultH.test libsql-sqlite3/ext/fts5/test/fts5origintext.test libsql-sqlite3/ext/fts5/test/fts5origintext2.test libsql-sqlite3/ext/fts5/test/fts5origintext3.test libsql-sqlite3/ext/fts5/test/fts5origintext4.test libsql-sqlite3/ext/fts5/test/fts5origintext5.test libsql-sqlite3/ext/fts5/test/fts5secure8.test libsql-sqlite3/ext/fts5/test/fts5tokenizer2.test libsql-sqlite3/ext/fts5/test/fts5trigram2.test libsql-sqlite3/ext/jni/src/org/sqlite/jni/annotation/Experimental.java libsql-sqlite3/ext/jni/src/org/sqlite/jni/capi/ConfigSqlLogCallback.java libsql-sqlite3/ext/jni/src/org/sqlite/jni/capi/ConfigSqllogCallback.java libsql-sqlite3/ext/jni/src/org/sqlite/jni/wrapper1/WindowFunction.java libsql-sqlite3/ext/wasm/GNUmakefile libsql-sqlite3/ext/wasm/batch-runner-sahpool.html libsql-sqlite3/ext/wasm/batch-runner-sahpool.js libsql-sqlite3/src/pager.c libsql-sqlite3/src/shell.c.in libsql-sqlite3/src/sqliteInt.h libsql-sqlite3/src/wal.c libsql-sqlite3/test/fts3integrity.test libsql-sqlite3/test/json/jsonb-q1.txt libsql-sqlite3/test/json106.test libsql-sqlite3/test/json107.test libsql-sqlite3/test/jsonb01.test libsql-sqlite3/test/mmapcorrupt.test libsql-sqlite3/test/releasetest_data.tcl libsql-sqlite3/test/shell9.test libsql-sqlite3/test/wapp.tcl libsql-sqlite3/test/wapptest.tcl
25 lines
806 B
Plaintext
25 lines
806 B
Plaintext
.mode qbox
|
|
.timer on
|
|
.param set $label 'q87'
|
|
SELECT rowid, x->>$label FROM data1 WHERE x->>$label IS NOT NULL;
|
|
|
|
CREATE TEMP TABLE t2(x JSON TEXT);
|
|
WITH RECURSIVE
|
|
c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<25000),
|
|
array1(y) AS (
|
|
SELECT json_group_array(
|
|
json_object('x',x,'y',random(),'z',hex(randomblob(50)))
|
|
)
|
|
FROM c
|
|
),
|
|
c2(n) AS (VALUES(1) UNION ALL SELECT n+1 FROM c2 WHERE n<5)
|
|
INSERT INTO t2(x)
|
|
SELECT jsonb_object('a',n,'b',n*2,'c',y,'d',3,'e',5,'f',6) FROM array1, c2;
|
|
CREATE INDEX t2x1 ON t2(x->>'a');
|
|
CREATE INDEX t2x2 ON t2(x->>'b');
|
|
CREATE INDEX t2x3 ON t2(x->>'e');
|
|
CREATE INDEX t2x4 ON t2(x->>'f');
|
|
UPDATE t2 SET x=jsonb_replace(x,'$.f',(x->>'f')+1);
|
|
UPDATE t2 SET x=jsonb_set(x,'$.e',(x->>'f')-1);
|
|
UPDATE t2 SET x=jsonb_remove(x,'$.d');
|