class BSON::MinKey
Represents a $minKey type, which compares less than any other value in the specification.
@see bsonspec.org/#/specification
@since 2.0.0
Constants
- BSON_TYPE
-
A $minKey is type 0xFF in the
BSON
spec.@since 2.0.0
- LESSER
-
Constant for always evaluating lesser in a comparison.
@since 2.0.0
Public Instance Methods
Source
Source
# File lib/bson/min_key.rb, line 72 def as_extended_json(**options) { "$minKey" => 1 } end
Converts this object to a representation directly serializable to Extended JSON
(github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md).
@option opts [ nil | :relaxed | :legacy ] :mode Serialization mode
(default is canonical extended JSON)
@return [ Hash
] The extended json representation.
Source
# File lib/bson/min_key.rb, line 61 def as_json(*_args) as_extended_json end
Return a representation of the object for use in application-level JSON
serialization. Since BSON::MinKey
is used exclusively in BSON-related contexts, this method returns the canonical Extended JSON
representation.
@return [ Hash
] The extended json representation.