-
Notifications
You must be signed in to change notification settings - Fork 5
Igor Query
An Igor query is a relationship pattern in which one of the subject patterns may be preceded by a subject marker.
This scary-looking syntax includes only three paths. I'll highlight each path in black.
In the first path, the Igor query has no subject marker.
In the second path, a subject marker is prepended to the first subject pattern in the relationship pattern:
In the third path, a subject marker is prepended to some subject pattern other than the first:
Explanations of subject markers TBD.
- The subjects of an instance pattern are the views that match the instance pattern.
- By default, a relationship pattern's subjects are the subjects of the last pattern in the relationship pattern. Subject markers and branch patterns override this default.
- If a pattern in an Igor query is marked with a subject marker, the Igor query's subjects are the subjects of the marked pattern.
- A branch pattern's subjects are the subjects of the first pattern in the enclosed relationship pattern.
Further explanation with examples TBD.
A subject marker is a dollar sign ($
)
prepended to an instance pattern or branch pattern.
A subject marker marks a pattern as the subject of the enclosing Igor query.
-
$s1 s2
— matches a views1
that has a descendant views2
.
At most one subject marker is allowed in an Igor query.
Subject markers are not allowed inside branch patterns.