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

Method cursor_distinct

test/test_typing.py:161–165  ·  view source on GitHub ↗
(
            collection: Collection,
        )

Source from the content-addressed store, hash-verified

159 return collection.distinct("_id")
160
161 def cursor_distinct(
162 collection: Collection,
163 ) -> list[None | int | str | ObjectId | bool]:
164 cursor = collection.find()
165 return cursor.distinct("_id")
166
167 collection_distinct(self.coll)
168 cursor_distinct(self.coll)

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
distinctMethod · 0.45

Tested by

no test coverage detected