Skip to content

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