MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / next

Method next

gridfs/synchronous/grid_file.py:1967–1971  ·  view source on GitHub ↗

Get next GridOut object from cursor.

(self)

Source from the content-addressed store, hash-verified

1965 )
1966
1967 def next(self) -> GridOut:
1968 """Get next GridOut object from cursor."""
1969 _disallow_transactions(self.session)
1970 next_file = super().next()
1971 return GridOut(self._root_collection, file_document=next_file, session=self.session)
1972
1973 def to_list(self, length: Optional[int] = None) -> list[GridOut]:
1974 """Convert the cursor to a list."""

Callers 5

to_listMethod · 0.95
readchunkMethod · 0.45
_read_size_or_lineMethod · 0.45
_next_with_retryMethod · 0.45
nextMethod · 0.45

Calls 2

GridOutClass · 0.85
_disallow_transactionsFunction · 0.70

Tested by

no test coverage detected