Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Dec 19, 2023
2 parents 145e26f + 7f5651f commit 7eff4d9
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions docs/concepts/query/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2413,8 +2413,7 @@ You have to:

* Select the *Object type*,
* check *Distinct* if needed (first try without it),
* choose the language for the query - XML is still the default,
* write the query into the text area,
* write the query in midPoint query language into the text area,
* and press *Translate and execute*.

Alternatively use an existing example from the selection box below.
Expand Down Expand Up @@ -2449,18 +2448,12 @@ To do this, follow these steps:
* Check *Translate from Query API script*, the expression text area will appear.
* Enter the code as an expression, e.g.:
+
[source,xml]
[source,java]
----
<expression>
<script>
<code>
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;
prismContext.queryFor(FocusType.class)
.item(FocusType.F_NAME).startsWith("a").build();
</code>
</script>
</expression>
prismContext.queryFor(FocusType.class)
.item(FocusType.F_NAME).startsWith("a").build();
----
* Choose the *Object type*, just like for any other query.
Just use the type from `queryFor(...)` call, in our example `FocusType`.
Expand All @@ -2474,4 +2467,6 @@ Using the expression requires proper imports - depending on the complexity of th
may need additional imports from packages like `com.evolveum.midpoint.schema`,
`com.evolveum.midpoint.prism.query` or others.

// TODO - prepare doc for query converter

// TODO mention extensions, xref:/midpoint/reference/schema/custom-schema-extension/

0 comments on commit 7eff4d9

Please sign in to comment.