struct

Mongo::Commands::GetMore::Result::Cursor

Inherits BSON::Serializable / Struct / Value / Object

Constructors

new(bson : BSON)

Allocate an instance and copies data from a BSON struct.

class User
  include BSON::Serializable
  property name : String
end

data = BSON.new
data["name"] = "John"
User.new(data)

Class methods

from_bson(bson : BSON)

NOTE: See self.new.

Instance methods

id=(id : Int64)
Source
next_batch
Source
next_batch=(next_batch : Array(BSON))
Source
ns=(ns : String)
Source
post_batch_resume_token
Source
post_batch_resume_token=(post_batch_resume_token : BSON | Nil)
Source
to_bson(bson = BSON.new)

Converts to a BSON representation.

user = User.new name: "John"
bson = user.to_bson