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

Method get_message

pymongo/message.py:1829–1847  ·  view source on GitHub ↗

Get a getmore message.

(
        self, dummy0: Any, conn: _AgnosticConnection, use_cmd: bool = False
    )

Source from the content-addressed store, hash-verified

1827 return self._as_command
1828
1829 def get_message(
1830 self, dummy0: Any, conn: _AgnosticConnection, use_cmd: bool = False
1831 ) -> Union[tuple[int, bytes, int], tuple[int, bytes]]:
1832 """Get a getmore message."""
1833 ns = self.namespace()
1834 ctx = conn.compression_context
1835
1836 if use_cmd:
1837 spec = self.as_command(conn)[0]
1838 if self.conn_mgr and self.exhaust:
1839 flags = _OpMsg.EXHAUST_ALLOWED
1840 else:
1841 flags = 0
1842 request_id, msg, size, _ = _op_msg(
1843 flags, spec, self.db, None, self.codec_options, ctx=conn.compression_context
1844 )
1845 return request_id, msg, size
1846
1847 return _get_more(ns, self.ntoreturn, self.cursor_id, ctx)
1848
1849
1850class _RawBatchQuery(_Query):

Callers

nothing calls this directly

Calls 4

namespaceMethod · 0.95
as_commandMethod · 0.95
_op_msgFunction · 0.85
_get_moreFunction · 0.85

Tested by

no test coverage detected