Skip to content

Commit

Permalink
Query documentation: added Object selection chapter to introduction.
Browse files Browse the repository at this point in the history
  • Loading branch information
mspanik committed Jan 29, 2024
1 parent f161c85 commit 4078901
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/concepts/query/midpoint-query-language/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Examples how to use the midPoint query in GUI can be found in xref:/midpoint/gui

=== Using in Configuration

Advanced query filters can be used in any configuration place. In XML configuration files it is wrapped inside `<text>` element inside `<filter>` element.
MidPoint Query filters can be used in any configuration place. In XML configuration files it is wrapped inside `<text>` element inside `<filter>` element.

For example query `givenName startsWith "J"` is stored in midPoint configuration this way.

Expand Down
28 changes: 28 additions & 0 deletions docs/concepts/query/midpoint-query-language/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,34 @@ You can use round brackets to group logical statements into more readable form.
familyName = "Doe" and (givenName = "John" or givenName ="Bill")
----

=== Object selection

Midpoint performs queries over defined set of objects.
In GUI, the set is defined by actually opened view.

In configuration, the object type must be *explicitly specified* for the query.
Not within the query itself.
See the configuration snippet below. The query will select `User` with name "XYZ".

[source,XML]
----
<activity>
<work>
<recomputation>
<objects>
<type>UserType</type>
<query>
<q:filter>
<q:text>name = "XYZ"</q:text>
</q:filter>
</query>
</objects>
</recomputation>
</work>
</activity>
----


== Advanced filters

=== matches filter
Expand Down

0 comments on commit 4078901

Please sign in to comment.