MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / add_server_api

Method add_server_api

pymongo/synchronous/pool.py:594–597  ·  view source on GitHub ↗

Add server_api parameters.

(self, command: MutableMapping[str, Any])

Source from the content-addressed store, hash-verified

592 client._send_cluster_time(command, session)
593
594 def add_server_api(self, command: MutableMapping[str, Any]) -> None:
595 """Add server_api parameters."""
596 if self.opts.server_api:
597 _add_to_command(command, self.opts.server_api)
598
599 def update_last_checkin_time(self) -> None:
600 self.last_checkin_time = time.monotonic()

Callers 7

commandMethod · 0.95
as_commandMethod · 0.45
as_commandMethod · 0.45
_execute_commandMethod · 0.45
execute_command_unackMethod · 0.45
_execute_commandMethod · 0.45

Calls 1

_add_to_commandFunction · 0.90

Tested by

no test coverage detected