Skip to content

Commit

Permalink
docs: improved operations page
Browse files Browse the repository at this point in the history
  • Loading branch information
Miksus committed Jun 30, 2022
1 parent f2a6ae1 commit b7ec142
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions docs/operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ Operations
Sometimes more sophisticated filtering operations
are needed such as getting items that are greater
than, less than etc. by specific field. For such
purpose, Red Bird provide operations.
purpose, Red Bird provide operations:

- ``greater_than``
- ``less_than``
- ``not_equal``
- ``between``
- ``in_``

Examples
--------

.. code-block:: python
Expand All @@ -15,4 +24,12 @@ purpose, Red Bird provide operations.
repo.filter_by(age=less_than(30))
repo.filter_by(age=not_equal(30))
repo.filter_by(age=not_equal(30))
.. code-block:: python
from redbird.oper import between, in_
repo.filter_by(age=between(20, 40))
repo.filter_by(age=in_([20, 40]))

0 comments on commit b7ec142

Please sign in to comment.