Dot operation with set notation #3
Labels
No labels
bug
duplicate
enhancement/documentation
enhancement/feature
enhancement/organization
question
rejected
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
UserCurt/mpath#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This feature request is to incorporate another means of matching multiple fields while being explicit in which fields those are as this is not currently possible. This is proposed through the usage of sets of fields. In the simplest form, this will be done by listing the field names within brace notation,
/{A,B,C}with each field delimited by a comma. This can be combined with dimension specifiers, like in/{A,B,C}#2.In the more general case, elements in this set can be nearly any kind of dot operation, like glob fields, quoted field strings, or regular expression strings. For example, these would be valid dot operations with set notation:
/{A*, B?},/{"x,y", ~"q.*p"}.Some open questions:
Some of these may interact with the
NullFieldsnamed argument.This issue may be promoted to an earlier release if these open questions can be satisfactorily addressed.
Usage of bracket syntax should be considered to unify the syntax with concatenation described in issue #2. A few examples:
/[A, B, C]/[A, B, C]#2/[A*, B?]/["x,y", ~"q.*p"]This issue has been partially implemented. Currently, set-style dot operations are implemented but only for
DotExactoperations, for example/{A,B,C}.Most pertinent commits:
80027dd: Added the initialDotSetoperation class and tests.f0631b2: Added parser support forDotSetsyntax in MPath strings.Other dot operations within sets is not yet supported.