forked from pulp/pulpcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
362 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added a filter `q` that supports complex filter expressions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added a filter `q` that supports complex filter expressions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Advanced Filtering | ||
================== | ||
|
||
In addition to the usual querystring filters, Pulp provides a special ``q`` filter, that allows you | ||
to combine other filters with `NOT`, `AND` and `OR` operations. | ||
|
||
For a given list endpoint, all the other existing (non ordering) filters can be used in these | ||
expressions. | ||
|
||
The grammar is basically:: | ||
|
||
EXPRESSION = SIMPLE_EXPR | "(" SIMPLE_EXPR | COMPOSIT_EXPR ")" | ||
COMPOSIT_EXPR = NOT_EXPR | AND_EXPR | OR_EXPR | ||
NOT_EXPR = "NOT" WS EXPRESSION | ||
AND_EXPRESSION = EXPRESSION "AND" EXPRESSION | ||
OR_EXPRESSION = EXPRESSION "OR" EXPRESSION | ||
SIMPLE_EXPRESSION = FILTERNAME "=" STRING | ||
STRING = SIMPLE_STRING | QUOTED_STRING | ||
|
||
Some example ``q`` expressions are:: | ||
|
||
pulp_type__in='core.rbac' | ||
NOT pulp_type="core.rbac" | ||
pulp_type__in=core.rbac,core.content_redirect | ||
pulp_type="core.rbac" OR pulp_type="core.content_redirect" | ||
pulp_type="core.rbac" AND name__contains=GGGG | ||
pulp_type="core.rbac" AND name__iexact={prefix}-gGgG | ||
pulp_type="core.rbac" AND name__icontains=gg AND NOT name__contains=HH | ||
NOT (pulp_type="core.rbac" AND name__icontains=gGgG) | ||
pulp_type="core.rbac" AND name__contains="naïve" | ||
pulp_type="core.rbac" AND NOT name__contains="naïve" | ||
pulp_type="core.rbac" AND( name__icontains=gh OR name__contains="naïve") | ||
pulp_type="core.rbac" OR name__icontains=gh OR name__contains="naïve" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.