Skip to content

Commit

Permalink
Address comments from review
Browse files Browse the repository at this point in the history
  • Loading branch information
erlendvollset committed Dec 1, 2023
1 parent d440014 commit d0edd32
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
12 changes: 6 additions & 6 deletions cognite/client/data_classes/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ class Equals(FilterWithPropertyAndValue):
Example:
Retrieve all instances where the property value equals 42:
Filter than can be used to retrieve items where the property value equals 42:
>>> from cognite.client.data_classes.filters import Equals
>>> filter = Equals(("some", "property"), 42)
Expand All @@ -532,7 +532,7 @@ class In(FilterWithPropertyAndValueList):
Example:
Retrieve all instances where the property value equals 42 or 43:
Filter than can be used to retrieve items where the property value equals 42 or 43 (or both):
>>> from cognite.client.data_classes.filters import In
>>> filter = In(("some", "property"), [42, 43])
Expand All @@ -550,7 +550,7 @@ class Exists(FilterWithProperty):
Example:
Retrieve all instances where the property value is set:
Filter than can be used to retrieve items where the property value is set:
>>> from cognite.client.data_classes.filters import Exists
>>> filter = Exists(("some", "property"))
Expand All @@ -569,7 +569,7 @@ class Prefix(FilterWithPropertyAndValue):
Example:
Retrieve all instances where the property value starts with "somePrefix":
Filter than can be used to retrieve items where the property value starts with "somePrefix":
>>> from cognite.client.data_classes.filters import Prefix
>>> filter = Prefix(("some", "property"), "somePrefix")
Expand All @@ -588,7 +588,7 @@ class ContainsAny(FilterWithPropertyAndValueList):
Example:
Retrieve all instances where the property value contains either 42 or 43:
Filter than can be used to retrieve items where the property value contains either 42 or 43:
>>> from cognite.client.data_classes.filters import ContainsAny
>>> filter = ContainsAny(("some", "property"), [42, 43])
Expand All @@ -607,7 +607,7 @@ class ContainsAll(FilterWithPropertyAndValueList):
Example:
Retrieve all instances where the property value contains both 42 and 43:
Filter than can be used to retrieve items where the property value contains both 42 and 43:
>>> from cognite.client.data_classes.filters import ContainsAll
>>> filter = ContainsAll(("some", "property"), [42, 43])
Expand Down
9 changes: 5 additions & 4 deletions docs/source/filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ The `Prefix` filter checks if a string property starts with a specified prefix.

Range
^^^^^
The `Range` filter checks if a numeric property's value is within a specified range.
The `Range` filter checks if a numeric property's value is within a specified range that can be
open-ended.

.. autoclass:: cognite.client.data_classes.filters.Range
:members:
Expand Down Expand Up @@ -163,23 +164,23 @@ Data Modeling-Specific Filters
------------------------------
HasData
^^^^^^^
The `HasData` filter checks if an item has data for a given property.
The `HasData` filter checks if an instance has data for a given property.

.. autoclass:: cognite.client.data_classes.filters.HasData
:members:
:member-order: bysource

MatchAll
^^^^^^^^
The `MatchAll` filter combines multiple sub-filters using a logical AND operation.
The `MatchAll` filter matches all instances.

.. autoclass:: cognite.client.data_classes.filters.MatchAll
:members:
:member-order: bysource

Nested
^^^^^^
The `Nested` filter applies a filter to a nested property.
The `Nested` filter applies a filter to the node pointed to by a direct relation property.

.. autoclass:: cognite.client.data_classes.filters.Nested
:members:
Expand Down

0 comments on commit d0edd32

Please sign in to comment.