Commit Graph

14513 Commits

Author SHA1 Message Date
drh 3ad93bba84 Enhance the json_extract() function so that if given multiple PATH arguments
it will return a JSON array with all of the answers.  Also update comments
within the json1 extension to reflect stricter interpretation of JSON and PATH
arguments.

FossilOrigin-Name: 1da60c3dda4254620052a83c853c2d2b6dd5009f
2015-08-29 19:41:45 +00:00
drh 3be094df69 Link the json1 extension into the command-line shell by default.
FossilOrigin-Name: 2e8e239cec5a12ac81cf62c0fbe94fb5713c31b1
2015-08-29 19:03:33 +00:00
dan 0cb01f5c2c Add a test for an fts5 tokenizer that supports synonyms by adding multiple entries to the fts index.
FossilOrigin-Name: 98d07d16cab92f1e7001afbe370df3ec6343fc1f
2015-08-29 18:46:12 +00:00
drh 20b3b6109b New test cases for the json1 extension.
FossilOrigin-Name: daff4832af963f98bcc1d2c2f84bd815d384f850
2015-08-29 18:30:30 +00:00
drh d29759288e Fix the build with -DSQLITE_OMIT_VIRTUALTABLE.
FossilOrigin-Name: 752918def7231f7846b3e985c9953a1cc825ab6b
2015-08-29 17:22:33 +00:00
drh d1f0068d19 Do not consider an empty string to be valid JSON. Add some additional
JSON test cases.

FossilOrigin-Name: fd19ff029f128f478f69910352a6f8b84262ce1d
2015-08-29 16:02:37 +00:00
dan ee0c0a8de3 Another change to the fts5 tokenizer API.
FossilOrigin-Name: fc71868496f45f9c7a79ed2bf2d164a7c4718ce1
2015-08-29 15:44:27 +00:00
drh a771402e55 Change the json1.c module so that it throws an error if any of the
JSON selector paths are malformed.

FossilOrigin-Name: 3aa0855fd463076fc3277f1d9fe00d2f30e6b449
2015-08-29 00:54:49 +00:00
drh f2df7e71d6 Back out the json_check() routine. Instead, throw an error if the input to
a json function (other than json_valid()) is not valid JSON.

FossilOrigin-Name: dc9ce7b18cbe23d065317757234ef9fb8792da7a
2015-08-28 20:07:40 +00:00
dan 57e0add3f9 Change the fts5 tokenizer API to allow more than one token to occupy a single position within a document.
FossilOrigin-Name: 90b85b42f2b2dd3e939b129b7df2b822a05e243d
2015-08-28 19:56:47 +00:00
dan 2798f0b54b Fix compiler warnings in rbu code.
FossilOrigin-Name: 0fdc36fe35ae2fc8e9688fe6c53437f4d47502d9
2015-08-28 16:41:45 +00:00
dan 3b05828ea8 When searching the wal file for a frame, do not search that part that was already checkpointed when the transaction was opened.
FossilOrigin-Name: a84cf4f5d326270a61faf4ff867260f2dd1e68a6
2015-08-28 16:18:45 +00:00
dan 8f9ea2dc70 Merge latest trunk into this branch.
FossilOrigin-Name: ab93024da7bd577d8850b417aff8597a8b3807fc
2015-08-28 15:50:24 +00:00
drh f6ec8d4f4c Add the json_check() function, which returns its argument if the argument
is well-formed JSON or which throws an error otherwise.

FossilOrigin-Name: 64abb65d4df11e5b3bcc4afc8e7c18e907c6080a
2015-08-28 03:48:04 +00:00
drh ecb5fedb3f Enhance the json_insert(), json_replace(), and json_set() functions with the
ability to add JSON instead of text if the argument is text and if the PATH
begins with '$$' instead of just '$'.

FossilOrigin-Name: 44f103d8862abc2d5613bac04dc2ea8e625b1f40
2015-08-28 03:33:50 +00:00
drh 31a5d34283 Fix the OR-optimization so that it always ignores subplans that do not use an index.
FossilOrigin-Name: cf452028d1be2c5578a07f6e21b4d8b613373eb8
2015-08-27 23:42:43 +00:00
drh 2dc292930d Fix the OR-optimization so that it always ignores subplans that do not
use an index.

FossilOrigin-Name: 66f92a16866e5825363636b9cc4b8f9b29d9e84d
2015-08-27 23:18:55 +00:00
drh c7c4680ffd Fix EXPLAIN QUERY PLAN output for indexed-expressions. Fix another
obscure fault in the WHERE term scanner.

FossilOrigin-Name: 73d361ce9e4d72c943def8b0b3caa227f9199aed
2015-08-27 20:33:38 +00:00
drh 29d03f6517 Fix problems in the indexed-expression handling in the optimizer.
FossilOrigin-Name: 03375017691d5b480e73d712c4318632e835060c
2015-08-27 19:56:49 +00:00
drh 6860e6fa6f Activate the ability to use expressions in indexes in a query. There are some
test failures, but mostly this seems to work.

FossilOrigin-Name: 42f93f582eccd8a778189aa6c113874f995ab751
2015-08-27 18:24:02 +00:00
drh b377020ca9 Merge changes from trunk.
FossilOrigin-Name: c80e9e8e8cc1e7676d7c782ee0827726875db79e
2015-08-27 16:07:02 +00:00
drh bb52308f3d Adjustments to the WHERE term scanning, to better handle scanning terms of
an index.

FossilOrigin-Name: 5611130a595e7f0b6d5f21d76f2755e9c09c7810
2015-08-27 15:58:51 +00:00
drh a3f108e93d Reduce the size of the WhereScan object by 24 bytes while also clarifying its
operation.

FossilOrigin-Name: cbc3c9a8bf169ae0b21f26855038502c6cc25cfe
2015-08-26 21:08:04 +00:00
drh e14796085a Merge enhancements from trunk.
FossilOrigin-Name: ec6ddb3d481d005c304a26c948c9c808586750e9
2015-08-26 18:04:23 +00:00
drh 5579d59fb3 Evaluate expressions only once when the same expression is used in both the
result set and in the ORDER BY clause.

FossilOrigin-Name: c2f3bbad778504681b39ab9399a1eb3c1a35ab3f
2015-08-26 14:01:41 +00:00
drh 0576bc59a7 Refactor With.a.zErr into With.a.zCteErr. No logic changes.
FossilOrigin-Name: 58ba73630ecc4bc58b03a7962dd45b305ef605ef
2015-08-26 11:40:11 +00:00
drh 1c4505de91 Update the TreeView output for compound SELECT statements so that all entries
are shown vertically aligned rather than each successive entry being indented.

FossilOrigin-Name: 65a8918776aa395009a690fa86bfc7d99eb973f9
2015-08-26 11:34:31 +00:00
drh 567cc1e407 Move sqlite3IndexColumnAffinity() inside of SQLITE_ENABLE_STAT3_OR_STAT4.
FossilOrigin-Name: b3732a4e1b42a86675d89766cb8089914e2fab9a
2015-08-25 19:42:28 +00:00
drh 760b32dff2 Merge trunk enhancements.
FossilOrigin-Name: e8b02902c48f3668dcff7b1767347ac7ef3c971e
2015-08-25 19:24:11 +00:00
drh e910769817 Use the sqlite3IndexColumnAffinity() routine to quickly and correctly find the
affinity of an index column.

FossilOrigin-Name: 1ee089a72d789002a0a377347fc51e08ab32fb14
2015-08-25 19:20:04 +00:00
drh 1f9ca2c84c Add code to maintain indexes with expression arguments across DELETE, INSERT,
and UPDATE statements.  Legacy tests pass, but the new code paths are still
largely untested.  The query planner currently makes no effort to use
expression indexes.

FossilOrigin-Name: efaabdb71626bdc03768e87e186c72f6f3da75b2
2015-08-25 16:57:52 +00:00
drh f8febc1b05 Fix a memory leak that might occur when compiling with SQLITE_OMIT_CHECK.
FossilOrigin-Name: 8f1d9f1f308518522ebb1eaebb9b184b4ac30924
2015-08-25 00:34:54 +00:00
drh a514b8eb0c Changes toward being abld to process indexes on expressions. Not there yet -
this check-in is just movement in that direction.  Some tests are failing.

FossilOrigin-Name: 0ad0f8d77d8f95ca2ffb7745d18219f5e87dc89c
2015-08-25 00:27:06 +00:00
drh fea870be38 Remove some redundant code: Call sqlite3ResolveExprListNames() rather than
calling sqlite3ResolveExprNames() in a loop - in two places.

FossilOrigin-Name: bdaf66465b6b1bdad10c08d9527b98e7000a41e4
2015-08-24 20:54:06 +00:00
drh 108aa00a87 Enhances the parser so that it accepts arbitrary expressions for the arguments
of an index, though the code generator still rejects everything other than
simple column names.  The sqlite3RestrictColumnListSyntax() routine is removed
since that feature is now handled by the parser.

FossilOrigin-Name: bed42116addabcf3dfdc2e2d51ae183965704988
2015-08-24 20:21:20 +00:00
drh 8981b904b5 Enhance the CREATE VIEW syntax so that the names of columns of the view can
be specified after the view name.

FossilOrigin-Name: d794b34da6f9c77dfe17773b0b17b22de72cce7f
2015-08-24 17:42:49 +00:00
mistachkin a09767b230 Enhancements to the batch build tool for MSVC.
FossilOrigin-Name: a1ae20cd97456a1126cfa1a9bedce0bac0940ad6
2015-08-24 17:18:43 +00:00
drh bc622bc045 Disallow the use of COLLATE clauses and the ASC and DESC keywords within
foreign key constraints and in the argument list to common table expressions.

FossilOrigin-Name: 83cbc4d8761498647794affffa961a4fca311be7
2015-08-24 15:39:42 +00:00
drh 80d874083b Improvements to JSON string dequoting.
FossilOrigin-Name: 196d66d34d9783622e6f2f79eafea1488fc6f5cf
2015-08-24 12:42:41 +00:00
drh 442a7c6015 Fix corner-case problems in the type and atom columns of json_each() and
json_tree().

FossilOrigin-Name: f0aba0e120074430cd7ad93291fcc97b8a25a054
2015-08-24 02:32:04 +00:00
drh e792b5b420 Fix a comment typo on sqlite3ExprAlloc(). No code changes.
FossilOrigin-Name: 518d6220a12fb1289f699ef0821e6adfcd286ed0
2015-08-23 20:48:29 +00:00
drh c3722b2103 Fix minor glitches in the json1.c extension, mostly having to do with OOM
behavior.

FossilOrigin-Name: cc5204149c4053b9e529a72102d8df0925ad1ea1
2015-08-23 20:44:59 +00:00
drh 8784eca17f Fixes to json_each() and json_tree(). Improved json_parse() debugging output.
FossilOrigin-Name: fc1b24f316af07a64672f6edc14ebcff487dffbb
2015-08-23 02:42:30 +00:00
drh bc8f092ca1 Add the json_valid() function to the json1.c extension. Fix various minor
problems in the json1.c extension.

FossilOrigin-Name: 380a97345b446214843a63ccc017d49a52d884da
2015-08-22 19:39:04 +00:00
drh be9474ee05 Fix a couple instances of OOM handling in the json extension.
FossilOrigin-Name: 213a6c5ccbcfe4495d45e3608e99a6398751aeed
2015-08-22 03:05:54 +00:00
drh 38978dd4ed Do not apply the WHERE-clause pushdown optimization to terms that originate
in the ON or USING clause of a LEFT JOIN.  Fix for ticket
[6df18e949d3676290].

FossilOrigin-Name: 351bc22fa9b5a2e50da3583a882c5aa390bda19f
2015-08-22 01:32:29 +00:00
drh 1fa97b3ec8 Add extension functions for processing JSON.
FossilOrigin-Name: 178f9a352c6c9e15e809e1a47530c6592d18578d
2015-08-21 20:43:32 +00:00
drh 6fd5c1e0e8 Fixes for compiler warnings and errors in the makefiles. Rename the
one test script to json101.test.

FossilOrigin-Name: 9ff6ccde5f26f18073587c320290570854ffc833
2015-08-21 20:37:12 +00:00
drh f28ed795db Change the name of the json loadable extension to "json1.c", in anticipation
of having future major changes to the interface.

FossilOrigin-Name: d0d4bec9e3d8829a2d488f2742f1650214fa716a
2015-08-21 20:12:43 +00:00
drh 4af352d47e Add the fullkey column to both json_each() and json_tree().
FossilOrigin-Name: 15dd99431e9ddd0fbdbb8dcc921687b0c6d26a29
2015-08-21 20:02:48 +00:00