Skip to content

Commit

Permalink
[doc] Update documentation for the query filter API
Browse files Browse the repository at this point in the history
Add the new types of arguments supported for dependency filtering.

Closes: #1432
Approved by: j-mracek
  • Loading branch information
Lukáš Hrázký authored and rh-atomic-bot committed Jan 27, 2020
1 parent b73c536 commit b6d99fa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions doc/api_queries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,20 @@
release string match against packages' releases
reponame string match against packages repositories' names
version string match against packages' versions
obsoletes Query match packages that obsolete any package from query
pkg Query match against packages in query
pkg* list match against hawkey.Packages in list
provides string match against packages' provides
provides* Hawkey.Reldep match against packages' provides
requires string match against packages' requirements
requires* Hawkey.Reldep match against packages' requirements
<DEP> string match against packages' <DEP>
<DEP>* Hawkey.Reldep match a reldep against packages' <DEP>
<DEP>* Query match the result of a query against packages' <DEP>
<DEP>* list(Package) match the list of hawkey.Packages against packages' <DEP>
sourcerpm string match against packages' source rpm
upgrades boolean see :meth:`upgrades`. Defaults to ``False``.
=============== ============== ======================================================

``<DEP>`` can be any of: requires, conflicts, obsoletes, enhances, recomments, suggests, supplements

\* The key can also accept a list of values with specified type.

The key name can be supplemented with a relation-specifying suffix, separated by ``__``:
Expand All @@ -133,6 +136,8 @@

q = base.sack.query().filter(name__substr="club")

Note that using packages or queries for dependency filtering performs a more advanced resolution than using a string or a reldep. When a package list or a query is used, rich dependencies are resolved in a more precise way than what is possible when a string or a reldep is used.

.. method:: filterm(\*\*kwargs)

Similar to :meth:`dnf.query.Query.filter` but it modifies the query in place.
Expand Down

0 comments on commit b6d99fa

Please sign in to comment.