(self, conn: _AgnosticConnection)
| 1620 | return f"{self.db}.{self.coll}" |
| 1621 | |
| 1622 | def use_command(self, conn: _AgnosticConnection) -> bool: |
| 1623 | use_find_cmd = False |
| 1624 | if not self.exhaust: |
| 1625 | use_find_cmd = True |
| 1626 | elif conn.max_wire_version >= 8: |
| 1627 | # OP_MSG supports exhaust on MongoDB 4.2+ |
| 1628 | use_find_cmd = True |
| 1629 | elif not self.read_concern.ok_for_legacy: |
| 1630 | raise ConfigurationError( |
| 1631 | "read concern level of %s is not valid " |
| 1632 | "with a max wire version of %d." % (self.read_concern.level, conn.max_wire_version) |
| 1633 | ) |
| 1634 | |
| 1635 | conn.validate_session(self.client, self.session) # type: ignore[arg-type] |
| 1636 | return use_find_cmd |
| 1637 | |
| 1638 | def update_command(self, cmd: dict[str, Any]) -> None: |
| 1639 | self._as_command = cmd, self.db |
no test coverage detected