(
self, name: str, session: Optional[ClientSession] = None, comment: Optional[Any] = None
)
| 1254 | return self._list_collection_names(session, filter, comment, **kwargs) |
| 1255 | |
| 1256 | def _drop_helper( |
| 1257 | self, name: str, session: Optional[ClientSession] = None, comment: Optional[Any] = None |
| 1258 | ) -> dict[str, Any]: |
| 1259 | command = {"drop": name} |
| 1260 | if comment is not None: |
| 1261 | command["comment"] = comment |
| 1262 | |
| 1263 | def inner( |
| 1264 | session: Optional[ClientSession], conn: Connection, _retryable_write: bool |
| 1265 | ) -> dict[str, Any]: |
| 1266 | return self._command( |
| 1267 | conn, |
| 1268 | command, |
| 1269 | allowable_errors=["ns not found", 26], |
| 1270 | write_concern=self._write_concern_for(session), |
| 1271 | parse_write_concern_error=True, |
| 1272 | session=session, |
| 1273 | ) |
| 1274 | |
| 1275 | return self.client._retryable_write(False, inner, session, _Op.DROP) |
| 1276 | |
| 1277 | @_csot.apply |
| 1278 | def drop_collection( |
no test coverage detected