Commit graph

95 commits

Author SHA1 Message Date
Pekka Enberg
e3f71259d8 Rename OwnedValue -> Value
We have not had enough merge conflicts for a while so let's do a
tree-wide rename.
2025-05-15 09:59:46 +03:00
Pekka Enberg
5a60815484 core/json: Remove redundant conditional compilation
The top-level `json` module declaration is already conditional on "json"
feature so no need to do it here.
2025-03-31 09:40:01 +03:00
Pekka Enberg
6258dda5f1 core/json: Rename json_path.rs to path.rs 2025-03-31 09:40:01 +03:00
Pekka Enberg
4a91988755 core/json: Rename json_operations.rs to ops.rs 2025-03-31 09:33:30 +03:00
Pekka Enberg
4b77f52bac core/json: Rename json_cache.rs to cache.rs 2025-03-31 09:32:34 +03:00
Ihor Andrianov
db5e364210
made json an optional module again 2025-03-30 19:01:03 +03:00
Ihor Andrianov
6c126dcd97
add jsonb_set 2025-03-30 18:58:40 +03:00
Ihor Andrianov
dba82b40e3
add compat tests 2025-03-30 18:58:40 +03:00
Ihor Andrianov
92a745ca49
fix tests 2025-03-30 18:58:39 +03:00
Ihor Andrianov
101dd51d7c
add jsonb_group_object and array 2025-03-30 18:58:39 +03:00
Ihor Andrianov
568dc54b9e
big cleanup 2025-03-30 18:58:33 +03:00
Ihor Andrianov
a983c979c6
jsonb_merge, json_group_array, json_group_object 2025-03-30 18:47:33 +03:00
Pere Diaz Bou
a13b33fec9 clippy again 2025-03-29 22:07:43 +01:00
Pere Diaz Bou
d9f5cd870d clippy 2025-03-29 22:04:08 +01:00
Pere Diaz Bou
5b7fcd27bd make column reuse blob/text fields 2025-03-29 22:02:49 +01:00
Pere Diaz Bou
9291f60722 Introduce Register struct
OwnedValue has become a powerhouse of madness, mainly because I decided
to do it like that when I first introduced AggContext. I decided it was
enough and I introduced a `Register` struct that contains `OwnedValue`,
`Record` and `Aggregation`, this way we don't use `OwnedValue` for
everything make everyone's life harder.

This is the next step towards making ImmutableRecords the default
because I want to remove unnecessary allocations. Right now we clone
OwnedValues when we generate a record more than needed.
2025-03-27 17:53:02 +01:00
Ihor Andrianov
1511c9b3bf
add json cache to json functions and fix tests 2025-03-24 13:17:58 +02:00
Ihor Andrianov
479dd9c35a
clippy 2025-03-23 21:11:35 +02:00
Ihor Andrianov
2cab36bfc3
add json_replace, jsonb_replace 2025-03-23 20:52:03 +02:00
Ihor Andrianov
c4549ad2cd
split json traversal and mutation operation logic 2025-03-23 20:37:12 +02:00
Ihor Andrianov
252583cb1e
add jsonb_obj jsonb_array 2025-03-20 15:22:52 +02:00
Ihor Andrianov
ca0be110ec
fix big number parsing for json functions 2025-03-19 12:53:34 +02:00
Ihor Andrianov
62916f3a97
cargo clippy 2025-03-19 11:59:20 +02:00
Ihor Andrianov
32ea972151
make tests pass 2025-03-19 11:29:46 +02:00
Ihor Andrianov
b5e86a9e36
remove and replace functions defenitions 2025-03-18 21:43:48 +02:00
Ihor Andrianov
328ebfcd9e
clippy 2025-03-16 15:31:06 +02:00
Ihor Andrianov
23d7d82b6c
add jsonb_extract function 2025-03-16 15:14:29 +02:00
Ihor Andrianov
0b22fbd566
Add jsonb to json_valid 2025-03-16 03:26:08 +02:00
Ihor Andrianov
dc6342c0de
Add jsonb impl to existing json functions where possible 2025-03-16 02:08:49 +02:00
Ihor Andrianov
b366045cb7
Rewrite parser to use slice and cursor instead of iterator 2025-03-14 19:47:18 +02:00
Ihor Andrianov
eb2d2fbd69
add tests 2025-03-12 15:03:41 +02:00
Ihor Andrianov
7bd10dd577
remove warnings and dead code 2025-03-12 15:03:40 +02:00
Ihor Andrianov
04f69220b7
add jsonb function implementation and json now understands blobs 2025-03-12 15:03:40 +02:00
Ihor Andrianov
47554fda85
add serialization functions 2025-03-12 15:03:27 +02:00
Ihor Andrianov
103c9bcb66
inital impl of json parsing 2025-03-12 15:02:49 +02:00
Ihor Andrianov
b8b0f860d7
clippy 2025-02-10 15:34:47 +02:00
Ihor Andrianov
a10955cbcf
refine quoted key handling, add RawString option for SQLite compat 2025-02-10 15:12:07 +02:00
Ihor Andrianov
ee16c49c6c
add support for quoted path 2025-02-10 15:09:27 +02:00
Ihor Andrianov
166532cc81
simplify json path parsing 2025-02-10 15:09:23 +02:00
pedrocarlo
41360075ba cargo clippy 2025-02-10 00:59:20 -03:00
pedrocarlo
fe453ecfc5 remove RC<String> requirement for build_text and new text 2025-02-09 13:44:39 -03:00
pedrocarlo
c3cad5dfdd corrected to use newly created as_str function to convert to string slice 2025-02-07 00:07:51 -03:00
pedrocarlo
c8bb1fd353 unreachable to agg and record types, as it should not be possible to pass them to json_quote 2025-02-06 23:43:30 -03:00
pedrocarlo
b678375c69 increasing string capacity to reduce allocations 2025-02-06 23:37:30 -03:00
pedrocarlo
90ecaf40b5 removed unnecessary string allocations for escaped json value 2025-02-06 23:37:30 -03:00
pedrocarlo
303a687e65 rebase to main 2025-02-06 23:35:58 -03:00
Pekka Enberg
f9828e0e6f core: Parse UTF-8 strings lazily 2025-02-06 13:27:52 +02:00
Pekka Enberg
0d318d810e core: Add Text::from_str() helper 2025-02-05 20:02:57 +02:00
Pekka Enberg
5abf49a0be core: Rename LimboText to Text 2025-02-05 20:02:27 +02:00
Marcus Nilsson
01492cf46f add support for json_set
Test cases are included.
Related to #127
2025-02-04 19:09:58 +01:00