@@ -39,6 +39,7 @@ def get_filter_by_attribute(self, attribute: str) -> Optional[str]:
39
39
"""
40
40
Returns a filter value by attribute name. It will match the attribute to the start of each filter attribute
41
41
and return the first found.
42
+
42
43
:param attribute: the attribute you want to search
43
44
:return: The value applied to that attribute or None
44
45
"""
@@ -607,11 +608,14 @@ def iterable_operation(self, operation: str, collection: str, filter_instance: C
607
608
""" Performs the provided filter operation on a collection by iterating over it.
608
609
609
610
For example:
610
- q.iterable(
611
- operation='any',
612
- collection='email_addresses',
613
- filter_instance=q.equals('address', '[email protected] ')
614
- )
611
+
612
+ .. code-block:: python
613
+
614
+ q.iterable(
615
+ operation='any',
616
+ collection='email_addresses',
617
+ filter_instance=q.equals('address', '[email protected] ')
618
+ )
615
619
616
620
will transform to a filter such as:
617
621
emailAddresses/any(a:a/address eq '[email protected] ')
@@ -753,7 +757,7 @@ def select(self, *attributes: str) -> CompositeFilter:
753
757
"""
754
758
Returns a 'select' query param
755
759
This is useful to return a limited set of attributes from a resource or return attributes that are not
756
- returned by default by the resource.
760
+ returned by default by the resource.
757
761
758
762
:param attributes: a tuple of attribute names to select
759
763
:return: a CompositeFilter instance that can render the OData select operation
@@ -770,8 +774,8 @@ def expand(self, relationship: str, select: Optional[CompositeFilter] = None) ->
770
774
"""
771
775
Returns an 'expand' query param
772
776
Important: If the 'expand' is a relationship (e.g. "event" or "attachments"), then the ApiComponent using
773
- this query should know how to handle the relationship (e.g. Message knows how to handle attachments,
774
- and event (if it's an EventMessage).
777
+ this query should know how to handle the relationship (e.g. Message knows how to handle attachments,
778
+ and event (if it's an EventMessage).
775
779
Important: When using expand on multi-value relationships a max of 20 items will be returned.
776
780
777
781
:param relationship: a relationship that will be expanded
0 commit comments