Class: BSON::BSON_C

Inherits:
Object
  • Object
show all
Defined in:
lib/bson/bson_c.rb

Class Method Summary collapse

Class Method Details

.deserialize(buf = nil) ⇒ Object



27
28
29
# File 'lib/bson/bson_c.rb', line 27

def self.deserialize(buf=nil)
  CBson.deserialize(ByteBuffer.new(buf).to_s)
end

.max_bson_sizeObject



31
32
33
# File 'lib/bson/bson_c.rb', line 31

def self.max_bson_size
  CBson.max_bson_size
end

.serialize(obj, check_keys = false, move_id = false) ⇒ Object



23
24
25
# File 'lib/bson/bson_c.rb', line 23

def self.serialize(obj, check_keys=false, move_id=false)
  ByteBuffer.new(CBson.serialize(obj, check_keys, move_id))
end

.update_max_bson_size(connection) ⇒ Object



35
36
37
# File 'lib/bson/bson_c.rb', line 35

def self.update_max_bson_size(connection)
  CBson.update_max_bson_size(connection)
end