MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / comment

Method comment

pymongo/synchronous/cursor.py:792–804  ·  view source on GitHub ↗

Adds a 'comment' to the cursor. http://mongodb.com/docs/manual/reference/operator/comment/ :param comment: A string to attach to the query to help interpret and trace the operation in the server logs and in profile data. .. versionadded:: 2.7

(self, comment: Any)

Source from the content-addressed store, hash-verified

790 return self
791
792 def comment(self, comment: Any) -> Cursor[_DocumentType]:
793 """Adds a 'comment' to the cursor.
794
795 http://mongodb.com/docs/manual/reference/operator/comment/
796
797 :param comment: A string to attach to the query to help interpret and
798 trace the operation in the server logs and in profile data.
799
800 .. versionadded:: 2.7
801 """
802 self._check_okay_to_chain()
803 self._comment = comment
804 return self
805
806 def where(self, code: Union[str, Code]) -> Cursor[_DocumentType]:
807 """Adds a `$where`_ clause to this query.

Callers 4

test_cloneMethod · 0.45
test_commentMethod · 0.45
test_cloneMethod · 0.45
test_commentMethod · 0.45

Calls 1

_check_okay_to_chainMethod · 0.95

Tested by 4

test_cloneMethod · 0.36
test_commentMethod · 0.36
test_cloneMethod · 0.36
test_commentMethod · 0.36