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

Function _parse_write_concern

pymongo/client_options.py:72–78  ·  view source on GitHub ↗

Parse write concern options.

(options: Mapping[str, Any])

Source from the content-addressed store, hash-verified

70
71
72def _parse_write_concern(options: Mapping[str, Any]) -> WriteConcern:
73 """Parse write concern options."""
74 concern = options.get("w")
75 wtimeout = options.get("wtimeoutms")
76 j = options.get("journal")
77 fsync = options.get("fsync")
78 return WriteConcern(concern, wtimeout, j, fsync)
79
80
81def _parse_read_concern(options: Mapping[str, Any]) -> ReadConcern:

Callers 1

__init__Method · 0.85

Calls 2

WriteConcernClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected