Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
henadzit committed Feb 5, 2025
1 parent 74b55f5 commit 9fc233d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ PostgreSQL and SQLite also support ``iposix_regex``, which makes case insensive
obj = await DemoModel.filter(demo_text__iposix_regex="^hello world$").first()
In PostgreSQL, ``filter`` supports additional lookup types:
In PostgreSQL, for ``JSONField``, ``filter`` supports additional lookup types:

- ``in`` - ``await JSONModel.filter(data__filter={"breed__in": ["labrador", "poodle"]}).first()``
- ``not_in``
Expand All @@ -301,6 +301,13 @@ In PostgreSQL, ``filter`` supports additional lookup types:
- ``istartswith``
- ``iendswith``

In PostgreSQL, for ``ArrayField``, the following lookup types are available:

- ``contains`` - ``await ArrayFields.filter(array__contains=[1, 2, 3]).first()`` which will use the ``@>`` operator
- ``contained_by`` - will use the ``<@`` operator
- ``overlap`` - will use the ``&&`` operator
- ``len`` - will use the ``array_length`` function, e.g. ``await ArrayFields.filter(array__len=3).first()``


Complex prefetch
================
Expand Down

0 comments on commit 9fc233d

Please sign in to comment.