Skip to content

Generate the JSON-path query UDFs#33

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/generate-jsonpath-udfs
Jul 9, 2026
Merged

Generate the JSON-path query UDFs#33
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/generate-jsonpath-udfs

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Add a JsonPath marshalling rule (jsonpath_in / jsonpath_out) to the UDF generator, the sibling of the existing Jsonb rule. It reaches the JSON-path query surface — the family of functions whose only unmarshalled argument is JsonPath:

  • jsonb_path_exists / jsonb_path_match / jsonb_path_query_array / jsonb_path_query_first
  • their jsonbset_* (set) and tjsonb_* (temporal) counterparts
  • jsonpath_in / jsonpath_out / jsonpath_copy

15 UDFs in total; the 1:1 generated surface grows by 15 (to 2788). The change is two dictionary entries: every other argument and return type of these functions is already marshalled, so the JsonPath argument is the only addition.

A GeneratedSurfaceTest case runs jsonb_path_exists through the generated jsonpath_in parse (a present path returns 1, an absent one 0), covering the new marshalling against libmeos. The JSON family is on in the CI libmeos by default (option(JSON ... ON)), so no build change is required.

Add a JsonPath marshalling rule (jsonpath_in / jsonpath_out) to the UDF
generator, the sibling of the existing Jsonb rule. It reaches the JSON-path
query surface the generator previously excluded for want of a JsonPath argument
marshalling: jsonb_path_exists / match / query_array / query_first, their
jsonbset_* and tjsonb_* counterparts, and jsonpath_in / out / copy (15 UDFs).

Cover the surface with a GeneratedSurfaceTest case that runs jsonb_path_exists
through the generated jsonpath_in parse.
@estebanzimanyi
estebanzimanyi merged commit 760f98d into MobilityDB:main Jul 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant