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

Method _pin

pymongo/synchronous/client_session.py:1069–1071  ·  view source on GitHub ↗

Pin this session to the given Server or to the given connection.

(self, server: Server, conn: Connection)

Source from the content-addressed store, hash-verified

1067 return self._transaction.pinned_conn
1068
1069 def _pin(self, server: Server, conn: Connection) -> None:
1070 """Pin this session to the given Server or to the given connection."""
1071 self._transaction.pin(server, conn)
1072
1073 def _unpin(self) -> None:
1074 """Unpin this session from any pinned Server."""

Callers 1

_checkoutMethod · 0.45

Calls 1

pinMethod · 0.45

Tested by

no test coverage detected