diff --git a/docs/operations.rst b/docs/operations.rst index 4790630..88a16e1 100644 --- a/docs/operations.rst +++ b/docs/operations.rst @@ -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 @@ -15,4 +24,12 @@ purpose, Red Bird provide operations. repo.filter_by(age=less_than(30)) - repo.filter_by(age=not_equal(30)) \ No newline at end of file + 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]))