drh
4500d87e76
Fix a memory leak in JSON group-aggregates when the output is JSONB.
...
FossilOrigin-Name: 08e7db138b636890cb29a76d65c2069c6e2ff44470fa4bca14f4526fe5f195ae
2023-10-03 22:40:22 +00:00
drh
f362731c1c
Fix a bug in the jsonReturnFromBlob() function that causes a positive result
...
for a negative value for when a JSON integer is too large and needs to be
converted into double.
FossilOrigin-Name: dca684da0c29ec78460362f972ea7747be42c13c4d1325da9d62c1ea58022e39
2023-10-03 21:54:09 +00:00
drh
51cc3041fe
Fix problems in the "json" output column of the json_tree() virtual table
...
for the case when the input is JSONB.
FossilOrigin-Name: fefa4475c496aab32fe7b9cc203747ce4faf7448da4f29b807e5486c7686238d
2023-10-03 20:58:39 +00:00
drh
6e737b9252
Improved handling of OOM while translating the JsonNode representing into
...
the BLOB representation.
FossilOrigin-Name: ef5956710bb542d6045c82937d02218a7ed45af94cf3959b0c180268e04d14e1
2023-10-03 19:37:19 +00:00
drh
f0c129f247
Merge the latest trunk enhancements into the jsonb branch.
...
FossilOrigin-Name: e6406a9865b75dea2f26d3ee4f4c206958400059c7f92ced88edc8507dd3c82f
2023-10-03 11:36:47 +00:00
drh
ee0f6777f9
Fix a problem in the JSONB parser that comes up following an OOM.
...
FossilOrigin-Name: 355acfb18897254f6b6444a21d781b5e10e930b81952850dd2a40d88bbf2f3db
2023-10-03 10:59:01 +00:00
drh
8405e1140a
Fix an issue with the use of jsonb_group_array() and jsonb_group_object()
...
when used by window functions.
FossilOrigin-Name: 808bd349ba587fbcdc4aea3f9c08e0df01ba08dec181c5af5ea157e89d86ff7b
2023-10-03 10:43:30 +00:00
drh
e5c384e9a5
Fix jsonb_insert() so that it does not behave like jsonb_set().
...
New test cases added.
FossilOrigin-Name: 54197149b811d30b6c4487eedf5692b164ed0f90cfcc541aa3157094f5f17f6a
2023-10-02 20:16:06 +00:00
drh
51e3f7a1c3
Fix the length of the string in the new concat() and concat_ws() functions.
...
FossilOrigin-Name: 325243226520376f4a142864ae3fb98866f25bff4dc50a6b648ef98428a7169f
2023-10-02 17:06:28 +00:00
drh
43d71eb892
Remove an ALWAYS() from a branch that can in fact be false following an OOM
...
fault.
FossilOrigin-Name: 3a1feb1c469d3dd50e2558581199b16bfd59b9d5bcb0de5f1a8f0ec30a17b4d1
2023-10-02 15:56:37 +00:00
drh
dee29e8c7a
New test cases for JSONB.
...
FossilOrigin-Name: d624c31e5c49e1ce63b4b72caa42a61c5167866f47d842fbcfe4e826fd079d7c
2023-10-02 14:51:28 +00:00
drh
c97407fdba
Allow json_replace() to accept JSONB arguments as the new value.
...
FossilOrigin-Name: 95eb7b37fab29931924311f541d52173ef77a448efc8771b1a1783ccd786d23d
2023-10-02 13:35:06 +00:00
drh
8eeafb7544
Improvements to error handling for BLOB inputs on JSON.
...
FossilOrigin-Name: 14f20ecbfab44934e86f1ac7a3f745b989aa8190c6df119ff5aa8100fa248d93
2023-10-02 13:20:43 +00:00
drh
5624b0b4cd
Gather forward references into a single place for the JSON code. Allow
...
JSONB arguments to json_array() and json_object() and similar.
FossilOrigin-Name: c352201b8c299c330d9abbff6dbcbcbcf00ada53183d3cd91020ec772e066357
2023-10-02 12:40:04 +00:00
drh
9b176f863b
Fix problems following OOM in JSONB parsing.
...
FossilOrigin-Name: 0d8cd6b5fb592f88f593ceaad9cdfa95dcfdf14169c3a56a5becbd66d62fd02b
2023-10-01 18:59:34 +00:00
drh
d8f26350a0
Restore the trunk version of sqlite3_user_data(). Fix the xColumn for virtual
...
tables so that the sqlite3_context contains a valid but NULL user data pointer.
FossilOrigin-Name: 15ffd932fecc82a5791b2024f55d2ec80887e8eb7345de68d6f5cac4912cfbe8
2023-09-30 16:50:17 +00:00
drh
7e86d3fc69
Finish adding jsonb_ versions for all JSON routines that return JSON text.
...
FossilOrigin-Name: 6daa7b69695e1b68dba317abbcad4d0205c91963d4a9eb2d595a3ec10fa0fdf4
2023-09-30 14:34:39 +00:00
drh
5736ba5ac3
Update json_each() and json_tree() so that they work with JSONB inputs.
...
FossilOrigin-Name: bb5e50ff56dff95d954aacdd4c5461790f953cef8d7b89da000d8d587fcdf9b8
2023-09-29 22:37:18 +00:00
drh
ee50aad865
The u.zJContent field of JsonNode for a string or label should NOT include
...
the quotation mark delimiters. Ever. This is an inefficiency that really
ought to be fixed on trunk, but that can wait until this branch lands.
FossilOrigin-Name: 96f545f6f839dab4829861361ee3d7a56840217c5f954f334616e77d23c5fe29
2023-09-29 19:47:25 +00:00
drh
a99e2fb576
Additional refactoring and cleanup.
...
FossilOrigin-Name: 45dd1760875b1ad899a10189c6f5a0a9a0677903794fb5a06ffacd39952a7882
2023-09-29 16:37:22 +00:00
drh
8be48440b6
Remove an incorrect assert().
...
FossilOrigin-Name: f090af775f6d2ce8b50850f5c9e33546bcb9cff5467d99ca210530cb7ca83d5b
2023-09-29 15:53:55 +00:00
drh
ae5f55e227
Improvements to comments and procedure names for clarity in the JSON
...
implementation.
FossilOrigin-Name: 9b620d813ef483f1277c1683c5e926a882f07f3b90804dea0c91b325ff8e45a4
2023-09-29 12:45:14 +00:00
drh
ecce6022d5
Describe the JSONB encoding in a header comment to the json.c source file.
...
FossilOrigin-Name: 1c0cba3461d6111b3aeb77726880221f1240355f0b57e060febbdeb12fb688c0
2023-09-29 11:17:43 +00:00
drh
8cdab14286
Fix some minor memory issues so that all legacy tests now pass.
...
FossilOrigin-Name: 1744bfc669346ff221f28d45fd978863e876a2d2f0b82bcf0e5ee6f0326900cc
2023-09-28 19:11:36 +00:00
drh
0a19bb078d
Allow the sqlite3_user_data() function to be invoked with a NULL argument
...
or with an sqlite3_context pointer from a virtual table. It returns NULL
in both cases.
FossilOrigin-Name: 2f49687371ada65fef374336c28b352c48ab98dc31282ac82397035efe04ba11
2023-09-28 18:23:52 +00:00
drh
edbc44c5a1
Merge trunk changes into the jsonb branch for the compiler warning fixes
...
from two days ago.
FossilOrigin-Name: cee113cc315b04fd75ccc172cf4529bf15b2050bf274433496c31a282e281ab8
2023-09-28 17:41:45 +00:00
drh
6b1db92228
Extract directly from BLOB is now complete and appears to work.
...
FossilOrigin-Name: 3de58ec99444b16dfcda1e226420e2343450b77abd3faf33a88b6d18339ef17c
2023-09-28 17:23:46 +00:00
drh
59862e6d22
Miscellaneous bugs fixed.
...
FossilOrigin-Name: 5c0815fa2e422d81198a43a2c04a022e319fcbcadfd4be4437f2e663892ca26b
2023-09-28 17:07:43 +00:00
drh
2dc60ec57f
Improvements to json_extract() to better support JSONB. Still not 100% working.
...
FossilOrigin-Name: 8c82576176539c4d132b14d46adbf31366c4bcaa59a61dd639dc9cc308fe8825
2023-09-28 15:56:35 +00:00
larrybr
d93cfa2831
Clarify serialization API doc w.r.t. buffer validity and usage, instigated by [forum:/forumpost/8922e2ad2ad41205|forum post 8922e2ad2ad41205]. No code changes.
...
FossilOrigin-Name: b488b9fb71652eca90d2bf73d32f3d748badf517859dc833c58e021b0e017194
2023-09-28 15:00:25 +00:00
drh
1854837b5a
Work toward getting json_extract() to operate directly on the BLOB, omitting
...
the translation into a JsonNode array.
FossilOrigin-Name: c1feba70f55a8e5f4696d48e4706855415d173ac8ac3c2656787c242a883b4f5
2023-09-28 10:20:56 +00:00
drh
61df55d0be
Fix harmless compiler warnings in the testfixture testing utility.
...
FossilOrigin-Name: 5a39a02d2dfd9ed6171cd0bd434b2bc268d0ed8ead6e1a396d1603266d9493ef
2023-09-26 21:22:46 +00:00
drh
676bcf7457
Merge partial-index constant value fixes from trunk into the jsonb branch.
...
FossilOrigin-Name: 700bdbd7383f66a0da675c197204da4e7b6ed757155145ee98d572de32a5d0ae
2023-09-26 19:46:38 +00:00
drh
0e224d93ea
Fix yet another assert() in the partial-index constant value optimization.
...
FossilOrigin-Name: f459d0806cf044fd07743e4c91d0a5a6ddf45b3b41004bde4278f190d99a4cf5
2023-09-26 19:38:24 +00:00
drh
42156fd90c
Add in many jsonb_xxxx() interfaces. Still uses the internal JsonNode
...
representation for transformations and search, but it does at least conform
to the desired API design. Largely untested.
FossilOrigin-Name: e6045b4e1bf3a8e33926fc12b3c039f5e1002eaecbe277ffa82b0ec271a29d17
2023-09-26 19:30:46 +00:00
dan
1c67749166
Remove a NEVER() from a condition in the partial-index constant value optimization that can sometimes be true.
...
FossilOrigin-Name: 63aea8c3e0605edcf49ad1e5ce1a56d2690dcb8c4857043997545daab46ca035
2023-09-26 19:26:47 +00:00
drh
219e7f7986
Merge all the latest trunk enhancements into jsonb branch.
...
FossilOrigin-Name: ac242c4d47ec36aab1c2fa5e65e7b595e686f49473b75bd63708d05c59ce3f0f
2023-09-26 15:13:04 +00:00
drh
a6e7202677
Remove unreachable code from the partial-index constant value optimization
...
([8d4160910d651246]).
FossilOrigin-Name: 7ad38254c37153efa72291d09800693ca60894359548eda877d59defa8c70d49
2023-09-26 14:57:30 +00:00
dan
1b96f9167f
Another very minor tweak to code on this branch to save cycles.
...
FossilOrigin-Name: 2c805dc68112db7f06aea56a731a33e046e876851bdda3e725ba96f6da1bf2ee
2023-09-25 17:21:53 +00:00
drh
09f23d2a36
When parsing JSON text into the BLOB format, only use node type JSONB_TEXTJ
...
for an unquoted object label if the object label contains escape sequences.
FossilOrigin-Name: a82ebbac3c542ec7f86d1e8414d7fd166db48450115ee3b26d12b5bb445f5896
2023-09-25 17:14:17 +00:00
dan
cf0906575d
Change the order of an if..else... in new code to make it slightly faster.
...
FossilOrigin-Name: f80dc64483a54a488e507da140836261ae1b864577cc95d8e869919d5a25e73c
2023-09-25 15:25:49 +00:00
drh
5933581cf0
As a temporary measure, try to translate the BLOB JSON format into the
...
legacy node format for processing.
FossilOrigin-Name: 14f2e95a9e531ef0d3fa7f1249f23c073a50c31b2109eefc2f258cada635ac2f
2023-09-25 13:23:29 +00:00
dan
873849b81e
Fix a bad interaction between LEFT JOIN, bloom filters and partial indexes.
...
FossilOrigin-Name: 5775f92b31f0539c66d37e50689bec17a82c0e857a781331c03e34bc18157087
2023-09-25 11:12:39 +00:00
dan
7a9bbfe1fa
Avoid an error when parsing a schema that contains indexes with WHERE clauses containing unknown collation sequences.
...
FossilOrigin-Name: d5dd39e37ab994ce5d75688a40c6494c17807431529e85eb2b11d58f367fe232
2023-09-23 19:25:03 +00:00
dan
c18c7523a4
Fix a failing assert() caused by changes on this branch.
...
FossilOrigin-Name: d0e21f20bd8643d21c4b88fb75b83939d68e9b7118f7289a164656f11d2ee555
2023-09-23 18:52:22 +00:00
drh
9f811a35b8
Fix a harmless compiler warning.
...
FossilOrigin-Name: 7c4210253b660b385d14de3ae7ab30f038036308e1164ec17b40e2805b9b2235
2023-09-23 18:49:30 +00:00
dan
bd42642431
In partial index scans, if the WHERE clause implies a constant value for a table column, replace occurences of that table column with the constant. This increases the likelihood of the partial index being a covering index.
...
FossilOrigin-Name: 66ed7abdfa228abde2052e3988589371f0e49b11582b1b4a83255d2df3a0aefa
2023-09-22 20:21:27 +00:00
drh
e367e453e1
Fix minor parse-to-BLOB bugs.
...
FossilOrigin-Name: 8b53b2e6600c324ff7864840d98a3f03896b9792fcb60b70cc1f6227b3bd4ca1
2023-09-22 16:20:48 +00:00
drh
c1c1d4d4a6
Add the ability to render a binary BLOB back into valid canonical JSON.
...
FossilOrigin-Name: 0b70cb77a4c8e3f17932f1ecca3942e0b0b03de637fb9656a130fe045f7ef826
2023-09-22 14:33:39 +00:00
drh
90189be7ce
Begin adding code to render binary JSON back into text. Very incomplete.
...
This is an incremental check-in.
FossilOrigin-Name: b817dd865ed60fc4da0b662a9edec0fceb8921b02ce98133bdd565988939fd0f
2023-09-22 12:16:56 +00:00