Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
larsschwegmann committed Oct 14, 2024
1 parent a59384f commit dda4eaf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,17 @@ In PostgreSQL and MYSQL, you can use the ``contains``, ``contained_by`` and ``fi
obj5 = await JSONModel.filter(data__filter={"owner__name__isnull": True}).first()
obj6 = await JSONModel.filter(data__filter={"owner__last__not_isnull": False}).first()
In PostgreSQL and MySQL, you can use ``postgres_posix_regex`` to make comparisons using POSIX regular expressions:
On PostgreSQL, this uses the ``~`` operator, on MySQL it uses the ``REGEXP`` operator.
In PostgreSQL, MySQL and SQLite, you can use ``posix_regex`` to make comparisons using POSIX regular expressions:
On PostgreSQL, this uses the ``~`` operator, on MySQL and SQLite it uses the ``REGEXP`` operator.
PostgreSQL and SQLite also support ``iposix_regex``, which makes case insensivity comparisons.

.. code-block:: python3
class DemoModel:
demo_text = fields.TextField()
await DemoModel.create(demo_text="Hello World")
obj = await DemoModel.filter(demo_text__posix_regex="^Hello World$").first()
obj = await DemoModel.filter(demo_text__iposix_regex="^hello world$").first()
Complex prefetch
Expand Down

0 comments on commit dda4eaf

Please sign in to comment.