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

Class DatabaseChangeStream

pymongo/synchronous/change_stream.py:462–479  ·  view source on GitHub ↗

A change stream that watches changes on all collections in a database. Should not be called directly by application developers. Use helper method :meth:`pymongo.database.Database.watch` instead. .. versionadded:: 3.7

Source from the content-addressed store, hash-verified

460
461
462class DatabaseChangeStream(ChangeStream[_DocumentType]):
463 """A change stream that watches changes on all collections in a database.
464
465 Should not be called directly by application developers. Use
466 helper method :meth:`pymongo.database.Database.watch` instead.
467
468 .. versionadded:: 3.7
469 """
470
471 _target: Database[_DocumentType]
472
473 @property
474 def _aggregation_command_class(self) -> Type[_DatabaseAggregationCommand]:
475 return _DatabaseAggregationCommand
476
477 @property
478 def _client(self) -> MongoClient[_DocumentType]:
479 return self._target.client
480
481
482class ClusterChangeStream(DatabaseChangeStream[_DocumentType]):

Callers 1

watchMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected