collation
– Tools for working with collations.
Tools for working with collations.
class pymongo.collation.``Collation
(locale, caseLevel=None, caseFirst=None, strength=None, numericOrdering=None, alternate=None, maxVariable=None, normalization=None, backwards=None, \*kwargs*)
Parameters: |
|
---|
class pymongo.collation.``CollationStrength
An enum that defines values for strength on a Collation
.
PRIMARY
= 1Differentiate base (unadorned) characters.
SECONDARY
= 2Differentiate character accents.
TERTIARY
= 3Differentiate character case.
QUATERNARY
= 4Differentiate words with and without punctuation.
IDENTICAL
= 5Differentiate unicode code point (characters are exactly identical).
class pymongo.collation.``CollationAlternate
An enum that defines values for alternate on a Collation
.
NON_IGNORABLE
= ‘non-ignorable’Spaces and punctuation are treated as base characters.
SHIFTED
= ‘shifted’Spaces and punctuation are not considered base characters.
Spaces and punctuation are distinguished regardless when the
Collation
strength is at leastQUATERNARY
.
class pymongo.collation.``CollationCaseFirst
An enum that defines values for case_first on a Collation
.
UPPER
= ‘upper’Sort uppercase characters first.
LOWER
= ‘lower’Sort lowercase characters first.
OFF
= ‘off’Default for locale or collation strength.
class pymongo.collation.``CollationMaxVariable
An enum that defines values for max_variable on a Collation
.
PUNCT
= ‘punct’Both punctuation and spaces are ignored.
SPACE
= ‘space’Spaces alone are ignored.
Previous topic
client_session
– Logical sessions for sequential operations
Next topic
collection
– Collection level operations