Mongo::Collation
Inherits BSON::Serializable / Struct / Value / Object
Collation allows users to specify language-specific rules for string comparison, such as rules for lettercase and accent marks.
Constructors
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)
Create a new Collation instance.
collation = Mongo::Collation.new(locale: "fr")
Class methods
Instance methods
Field that determines whether collation should consider whitespace and punctuation as base characters for purposes of comparison.
Field that determines whether collation should consider whitespace and punctuation as base characters for purposes of comparison.
Flag that determines whether strings with diacritics sort from back of the string, such as with some French dictionary ordering.
Flag that determines whether strings with diacritics sort from back of the string, such as with some French dictionary ordering.
A field that determines sort order of case differences during tertiary level comparisons.
A field that determines sort order of case differences during tertiary level comparisons.
Flag that determines whether to include case comparison at strength level 1 or 2.
Field that determines up to which characters are considered ignorable when alternate: "shifted". Has no effect if alternate: "non-ignorable"
Field that determines up to which characters are considered ignorable when alternate: "shifted". Has no effect if alternate: "non-ignorable"
Flag that determines whether to check if text require normalization and to perform normalization. Generally, majority of text does not require this normalization processing.
Flag that determines whether to check if text require normalization and to perform normalization. Generally, majority of text does not require this normalization processing.
Flag that determines whether to compare numeric strings as numbers or as strings.
Flag that determines whether to compare numeric strings as numbers or as strings.