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

Method inner

pymongo/synchronous/collection.py:651–668  ·  view source on GitHub ↗
(
            session: Optional[ClientSession], conn: Connection, _retryable_write: bool
        )

Source from the content-addressed store, hash-verified

649 cmd.update(options)
650
651 def inner(
652 session: Optional[ClientSession], conn: Connection, _retryable_write: bool
653 ) -> None:
654 if qev2_required and conn.max_wire_version < 21:
655 raise ConfigurationError(
656 "Driver support of Queryable Encryption is incompatible with server. "
657 "Upgrade server to use Queryable Encryption. "
658 f"Got maxWireVersion {conn.max_wire_version} but need maxWireVersion >= 21 (MongoDB >=7.0)"
659 )
660
661 self._command(
662 conn,
663 cmd,
664 read_preference=ReadPreference.PRIMARY,
665 write_concern=self._write_concern_for(session),
666 collation=collation,
667 session=session,
668 )
669
670 self.database.client._retryable_write(False, inner, session, _Op.CREATE)
671

Callers

nothing calls this directly

Calls 5

_commandMethod · 0.95
ConfigurationErrorClass · 0.90
_write_concern_forMethod · 0.80
updateMethod · 0.45
commandMethod · 0.45

Tested by

no test coverage detected