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

Class PinnedResponse

pymongo/response.py:85–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84
85class PinnedResponse(Response):
86 __slots__ = ("_conn", "_more_to_come")
87
88 def __init__(
89 self,
90 data: Union[_OpMsg, _OpReply],
91 address: _Address,
92 conn: _AgnosticConnection,
93 request_id: int,
94 duration: Optional[timedelta],
95 from_command: bool,
96 docs: list[_DocumentOut],
97 more_to_come: bool,
98 ):
99 """Represent a response to an exhaust cursor's initial query.
100
101 :param data: A network response message.
102 :param address: (host, port) of the source server.
103 :param conn: The AsyncConnection/Connection used for the initial query.
104 :param request_id: The request id of this operation.
105 :param duration: The duration of the operation.
106 :param from_command: If the response is the result of a db command.
107 :param docs: List of documents.
108 :param more_to_come: Bool indicating whether cursor is ready to be
109 exhausted.
110 """
111 super().__init__(data, address, request_id, duration, from_command, docs)
112 self._conn = conn
113 self._more_to_come = more_to_come
114
115 @property
116 def conn(self) -> _AgnosticConnection:
117 """The AsyncConnection/Connection used for the initial query.
118
119 The server will send batches on this socket, without waiting for
120 getMores from the client, until the result set is exhausted or there
121 is an error.
122 """
123 return self._conn
124
125 @property
126 def more_to_come(self) -> bool:
127 """If true, server is ready to send batches on the socket until the
128 result set is exhausted or there is an error.
129 """
130 return self._more_to_come

Callers 2

run_operationMethod · 0.90
run_operationMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected