Skip to content

tree schema FEATURE emit paths suitable for key search #2394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

snar
Copy link
Contributor

@snar snar commented May 11, 2025

Motivation: consider the structure with list hierarchy:

container earth {
  list country {
    key name;
    leaf name {....};
    list city {
      key name;
......

and you want to find cities in some country. Path built with LYSC_PATH_DATA_PATTERN (/earth/country[name='%s']/city[name='%s']/name) can't be used for this task because it contains predicate for city (so you must know it in advance), and path built with LYSC_PATH_DATA (/earth/country/city/name) will find cities in the entrie earth, not limited by country.
New LYSC_PATH_KEY_PATTERN will emit /earth/country[name='%s']/city/name here making the task doable.

@michalvasko
Copy link
Member

I am sorry but I do not see much value in such an addition. There are lots of other path patterns with possible use-cases and none of them supported. So I suppose if you really need such a path, you have to generate it yourself.

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