struct Wakdata::RestAPI::CryoMongo::VersionData
- Wakdata::RestAPI::CryoMongo::VersionData
- Struct
- Value
- Object
Included Modules
- BSON::Serializable
- JSON::Serializable
Defined in:
wakdata/rest-api/cryomongo.crConstructors
- .new(data_name : String, versions : Array(String) = Array(String).new, _id : BSON::ObjectId = BSON::ObjectId.new, creation_date : Time = Time.utc)
-
.new(bson : BSON)
Allocate an instance and copies data from a BSON struct.
- .new(pull : JSON::PullParser)
Class Method Summary
-
.from_bson(bson : BSON)
NOTE See
self.new
.
Instance Method Summary
- #_id : BSON::ObjectId
- #clone
- #copy_with(data_name _data_name = @data_name, versions _versions = @versions, _id __id = @_id, creation_date _creation_date = @creation_date)
- #creation_date : Time
- #data_name : String
-
#to_bson(bson = BSON.new)
Converts to a BSON representation.
- #versions : Array(String)
Constructor Detail
def self.new(data_name : String, versions : Array(String) = Array(String).new, _id : BSON::ObjectId = BSON::ObjectId.new, creation_date : Time = Time.utc)
#
def self.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 Method Detail
Instance Method Detail
def copy_with(data_name _data_name = @data_name, versions _versions = @versions, _id __id = @_id, creation_date _creation_date = @creation_date)
#
def to_bson(bson = BSON.new)
#
Converts to a BSON representation.
user = User.new name: "John"
bson = user.to_bson