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

Method _write_concern_for

pymongo/common.py:946–951  ·  view source on GitHub ↗

Read only access to the write concern of this instance or session.

(self, session: Optional[_AgnosticClientSession])

Source from the content-addressed store, hash-verified

944 return self._write_concern
945
946 def _write_concern_for(self, session: Optional[_AgnosticClientSession]) -> WriteConcern:
947 """Read only access to the write concern of this instance or session."""
948 # Override this operation's write concern with the transaction's.
949 if session and session.in_transaction:
950 return DEFAULT_WRITE_CONCERN
951 return self.write_concern
952
953 @property
954 def read_preference(self) -> _ServerMode:

Callers 15

get_cursorMethod · 0.80
innerMethod · 0.80
drop_databaseMethod · 0.80
innerMethod · 0.80
bulk_writeMethod · 0.80
insert_oneMethod · 0.80
insert_manyMethod · 0.80
replace_oneMethod · 0.80
update_oneMethod · 0.80
update_manyMethod · 0.80
delete_oneMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected