Skip to content

Conversation

theory
Copy link
Owner

@theory theory commented May 24, 2025

Add the following jsonpath methods:

  • l/r/btrim()
  • lower(), upper()
  • initcap()
  • replace()
  • split_part()

Each simply dispatches to the standard string processing functions. These depend on the locale, but since it's set at initdb, they can be considered immutable and therefore allowed in any jsonpath expression.

@theory theory self-assigned this May 24, 2025
@theory theory force-pushed the more-jsonpath-methods branch 3 times, most recently from 6c61d21 to b996d19 Compare May 28, 2025 17:29
@theory theory force-pushed the more-jsonpath-methods branch 14 times, most recently from f3eb863 to 8f2146a Compare June 4, 2025 15:21
@theory theory force-pushed the more-jsonpath-methods branch from 8f2146a to ea19345 Compare June 14, 2025 15:06
Rename the `csv_` tokens to `int_`, because they represent signed or
unsigned integers, as follows:

*   `csv_elem` => `int_elem`
*   `csv_list` => `int_list`
*   `opt_csv_list` => `opt_int_list`

Rename the `datetime_precision` tokens to `uint_arg`, as they represent
unsigned integers and will be useful for other methods in the future, as
follows:

*   `datetime_precision` => `uint_elem`
*   `opt_datetime_precision` => `opt_uint_arg`

Rename the `datetime_template` tokens to `str_arg`, as they represent
strings and will be useful for other methods in the future, as follows:

*   `datetime_template` => `str_elem`
*   `opt_datetime_template` => `opt_str_arg`
@theory theory force-pushed the more-jsonpath-methods branch 4 times, most recently from 98f8bcd to 0db127d Compare July 10, 2025 23:01
Add the following jsonpath methods:

*   l/r/btrim()
*   lower(), upper()
*   initcap()
*   replace()
*   split_part()

Each simply dispatches to the standard string processing functions.
These depend on the locale, but since it's set at `initdb`, they can be
considered immutable and therefore allowed in any jsonpath expression.
@theory theory force-pushed the more-jsonpath-methods branch from 0db127d to 694cf34 Compare July 11, 2025 18:04
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.

2 participants