Skip to content

Commit

Permalink
Make 2.2 branch the default
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhiggs committed Aug 12, 2021
2 parents bd57d8d + b726b82 commit 1062e33
Show file tree
Hide file tree
Showing 32 changed files with 4,408 additions and 1,584 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ docs/source/pylint-badge.svg

# PyBuilder
target/

# Random play files
splat*
5 changes: 1 addition & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ typical pyramid + sqlalchemy application.

.. note::

Most work has shifted to an upcoming new version. The ``2_2_master`` branch is
where the development is happening, although the resulting release is likely
to be named "3" rather than "2" due to the number of breaking changes. More
information soon.
The default branch of pyramid_jsonapi is now the 2.2 branch.

Documentation
-------------
Expand Down
32 changes: 30 additions & 2 deletions docs/source/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,11 @@ Filtering
~~~~~~~~~

The JSON API spec doesn't say much about filtering syntax, other than that it
should use the parameter key ``filter``. In this implementation, we use syntax
like the following:
should use the parameter key ``filter``. There are multiple filtering syntaxes
available in pyramid_jsonapi.

The first is simple filtering and has been
available since the first release. It uses the following syntax:

.. code::
Expand All @@ -353,9 +356,20 @@ This is simple and reasonably effective. It's a little awkward on readability th

Search operators in sqlalchemy (called column comparators) must be registered before they are treated as valid for use in json-api filters. The procedure for registering them, and the list of those registered by default can be found in :ref:`search_filter_operators`.

To specify another search filter syntax use the syntax name with a ``*`` in
front in the square brackets after ``filter``, like
``filter[*rql]=some rql filter``.

Filter languages available:

* RQL defined here `<https://github.com/persvr/rql>`_ as implemented in
rqlalchemy `<https://github.com/pjwerneck/rqlalchemy>`_.

Filter Examples
^^^^^^^^^^^^^^^

**Simple**:

Find all the people with name 'alice':

.. code-block:: bash
Expand All @@ -379,3 +393,17 @@ Find all the posts where the author has the name 'alice':
.. code-block:: bash
http GET http://localhost:6543/api/posts?filter[author.name:eq]=alice
**RQL**

Find all the people with name 'alice':

.. code-block:: bash
http :6543/api/people filter[*rql]='eq(name,alice)'
Find all the posts where the author has the name 'alice':

.. code-block:: bash
http :6543/api/posts filter[*rql]='eq((author,name),alice)'
Loading

0 comments on commit 1062e33

Please sign in to comment.