Skip to content

Removed ToC on Query for Null page and added Python None caveat for… #2863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions source/tutorial/query-for-null-fields.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Query for Null or Missing Fields

.. default-domain:: mongodb

.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol

Different query operators in MongoDB treat ``null`` values differently.

.. |query_operations| replace:: operations that query for ``null`` values
Expand All @@ -34,9 +28,20 @@ Different query operators in MongoDB treat ``null`` values differently.
Equality Filter
---------------

The ``{ item : null }`` query matches documents that either
contain the ``item`` field whose value is ``null`` *or* that
do not contain the ``item`` field.
.. tabs::

tabs:
- id: shell
content: |
The ``{ item : null }`` query matches documents that either
contain the ``item`` field whose value is ``null`` *or* that
do not contain the ``item`` field.

- id: python
content: |
The ``{ item : None }`` query matches documents that either
contain the ``item`` field whose value is ``null`` *or* that
do not contain the ``item`` field.

For example, the following query returns both documents:

Expand Down