limbo/testing
Jussi Saurio a934ead904 Merge 'Json extract' from Kacper Madej
Implements the `json_extract` function.
In the meantime, the json path has already been implemented by
@petersooley in https://github.com/tursodatabase/limbo/pull/555 which is
a requirement for `json_extract`.
However, this PR takes a different approach and parses the JSON path
using the JSON grammar, because there are a lot of quirks in how a JSON
`key` can look (see the JSON grammar in the Pest file).
The downside is that it allocates more memory than the current
implementation, but might be easier to maintain in the long run.
I included a lot of tests with some quirky behavior of the
`json_extract` (some of them still need some work). I also noticed that
these changed between sqlite versions (had `SQLite 3.43.2` locally and
`3.45` gave different results). Due to this, I'm not sure how much value
there is in trying to be fully compatible with SQLite. Perhaps the
approach taken by @petersooley solves 99% of use-cases?

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #524
2025-01-03 23:53:29 +02:00
..
wal testing: Add test database + WAL file 2024-08-03 12:16:34 +03:00
agg-functions.test support TRUE and FALSE in predicates 2024-12-13 22:58:29 +02:00
all.test feat: subqueries in FROM clause 2024-12-31 14:18:29 +02:00
cmdlineshell.test refactor(testing): move .table tests to shelltests.py 2024-12-18 09:10:37 +02:00
coalesce.test testing: coalesce.test 2024-07-16 07:20:35 +03:00
gen-database.py testing: update testing with products table and cross join test 2024-07-09 18:08:16 +02:00
glob.test Fix glob 2024-12-30 17:02:31 +05:30
groupby.test Dont assume GROUP BY has aggregates 2024-12-16 00:30:38 +02:00
insert.test Feature: last_insert_rowid() 2024-12-09 22:48:42 +05:30
join.test Handle quoting identifiers properly 2024-12-18 19:45:06 +01:00
json.test PR remarks #2 2025-01-02 15:09:16 +07:00
like.test Support like function with escape 2024-12-28 13:55:12 +05:30
math.test Add compatability tests for mod operator 2024-12-27 15:39:02 -05:00
orderby.test test ordering by aggregate not mentioned in select 2024-11-26 17:31:51 +02:00
pragma.test pragma: inital approach to handle pragma statements 2024-12-18 17:26:16 +01:00
scalar-functions-datetime.test core: support modifiers in date function 2024-09-03 14:28:07 +07:00
scalar-functions.test Fix sqlite_version() out of bound 2024-12-27 11:39:33 -03:00
select.test Handle quoting identifiers properly 2024-12-18 19:45:06 +01:00
shelltests.py refactor(testing): move .table tests to shelltests.py 2024-12-18 09:10:37 +02:00
subquery.test feat: subqueries in FROM clause 2024-12-31 14:18:29 +02:00
tester.tcl Add test function with regex 2024-12-27 11:39:02 -03:00
testing.db index scan wip foo doesnt work yet 2024-10-05 18:25:04 +03:00
testing_norowidalias.db Run all tcl tests on 2 separate dbs (1. with rowid aliases 2. without rowid aliases) 2024-12-14 17:13:45 +02:00
where.test fix: index seek wrong 2025-01-02 11:11:44 +08:00