01_user_documentation:groimp-platform:xl-query
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| 01_user_documentation:groimp-platform:xl-query [2025/01/24 11:59] – ↷ Links adapted because of a move operation gaetan | 01_user_documentation:groimp-platform:xl-query [2025/01/24 17:07] (current) – removed gaetan | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | see also: [[01_user_documentation: | ||
| - | |||
| - | In the following a set queries is listed and the results of them applied on the graph in the image. This graph is created by the turtle query: '' | ||
| - | |||
| - | {{: | ||
| - | |||
| - | |Query | Result | Description | | ||
| - | |**Basic** ||| | ||
| - | |A or a:A | {a1, | ||
| - | |a: | ||
| - | |**Node based path pattern** ||| | ||
| - | |(* A F *) A | {a3} | direct combination of nodes | | ||
| - | |(* F *) A | {a2,a3,a4} | other example | | ||
| - | |**Edge based path pattern** ||| | ||
| - | |**ANY_EDGE** ||| | ||
| - | | %%(* A --> *) F %% | {f1,f2} | next node | | ||
| - | | %%A (*<-- F*) %% | {a2,a3,a4} | prev node | | ||
| - | | %%(* F -- *) A %% | {a1, | ||
| - | |**SUCCESSOR_EDGE** ||| | ||
| - | | %%(* A > *) F %% | {f2} | next node | | ||
| - | | %%A (* < F *) %% | {a2,a3,a4} | prev node | | ||
| - | | %%(* F --- *) A %% | {a1, | ||
| - | |**BRANCH_EDGE** ||| | ||
| - | | %%(*A +>*) F %% | {f1} | next node | | ||
| - | | %%A (* <+ F *) %% | {} | prev node | | ||
| - | | %%(*F -+- *) A %% | {a1} | undirected | | ||
| - | |**Single Match, Late Match and Optional Patterns** ||| | ||
| - | | %%A (: --> F)%% | {f1} | find first pattern | | ||
| - | | %%A (& --> F)%% | {f1} | find last pattern | | ||
| - | | %%A (? +> F)%% | {Null} | changes nothing to NULL | | ||
| - | |**Transitive closures** ||| | ||
| - | | %%(* A > > *) A %% | {a3} | Path described by single edges | | ||
| - | | %%(* A +> > *) A %% | {a2} | other example | | ||
| - | | %%(* A (-->)* *) A %% | {a1, | ||
| - | | %%(* A (-->)+ *) A %% | {a2,a3,a4} | (1-to-n edges possible) | | ||
| - | | %%(* A (-->)? *) F %% | {f1,f2} | (0-to-1 edges possible) | | ||
| - | | %%(* A (-->){2} *)F %% | {f2} | 2 edges | | ||
| - | | %%(* A (--> | ||
| - | |**Combined** ||| | ||
| - | | %%f:F, A +> f, A < f %% | {f1} | patterns combined by comma | | ||
| - | |||
| - | |||
| - | ====== Additional information ====== | ||
| - | |||
| - | |||
| - | ===== Field based conditions===== | ||
| - | |||
| - | {{: | ||
| - | |||
| - | |Query | Result | Description | | ||
| - | | A(2,2.3)| a1 | all fields are defined | | ||
| - | | A(2,) | a1,a3,a4| only the first field is defined and considered | | ||
| - | | A(2, | ||
| - | | A(, | ||
| - | | A(x, | ||
| - | |||
| - | The condition part behind the comma can be replaced by any boolean condition, including predefined functions that return a boolean value. | ||
| - | The query variables defined here can also be used in the production of the rewriting rule or in followup expressions of a lambda expression. | ||
| - | ===== Queries as query conditions ===== | ||
| - | |||
| - | As said above a query condition can be any boolean condition, this includes also queries and lambda expressions, | ||
| - | < | ||
| - | [f: | ||
| - | </ | ||
| - | |||
| - | Or a query as a part of a boolean condition, for example used with the count operator to get the order of an internode in a tree model: | ||
| - | < | ||
| - | (*f: | ||
| - | (*f: | ||
| - | </ | ||
| - | |||
| - | The inner query of this is explained below. | ||
| - | |||
| - | ===== Transitive closures ===== | ||
| - | |||
| - | As shown above transitive closure can be used to define a range of edges between two nodes, e.g. '' | ||
| - | |||
| - | | query | description | | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | | '' | ||
| - | |||
| - | Using transitive closure it is possible to find the same node several times!!! for instance | ||
| - | |||
| - | %%Axiom ==> A A A B;%% | ||
| - | |||
| - | the pattern (*A (>)* B*) would return B three times. | ||
01_user_documentation/groimp-platform/xl-query.1737716340.txt.gz · Last modified: 2025/01/24 11:59 by gaetan
