mongodb-driver v0.5.1 Mongo.Cursor View Source
MongoDB Cursor as a stream. There are two variants:
- normal cursor: This is called in batch mode and closes automatically with a kill cursor command.
- change stream cursor: This will operate a change stream. MongoDB does not return documents after the time has expired. In this case
get_more
will called again. No kill cursor command is invoked just because no documents are being returned. In case of error a resume process is started so that events can be received again without losing any previous events. The resume process requires a resume token or an operation time. These are cached by the cursor. One can determine the resume token via a function (on_resume_token). It is called when the resume token changed.
Link to this section Summary
Link to this section Types
Link to this type
t()
View Source
t()
View Source
t() :: %Mongo.Cursor{
cmd: BSON.document(),
on_resume_token: (... -> any()),
opts: Keyword.t(),
topology_pid: GenServer.server()
}
t() :: %Mongo.Cursor{ cmd: BSON.document(), on_resume_token: (... -> any()), opts: Keyword.t(), topology_pid: GenServer.server() }