Parse write concern options.
(options: Mapping[str, Any])
| 70 | |
| 71 | |
| 72 | def _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 | |
| 81 | def _parse_read_concern(options: Mapping[str, Any]) -> ReadConcern: |
no test coverage detected