-
Notifications
You must be signed in to change notification settings - Fork 34
DOCSP-47055: Collation #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
To specify a collation for your operation, pass an ``$options`` array | ||
parameter that sets the ``collation`` option to the operation method. | ||
Assign the ``collation`` option to an array that configures the collation | ||
rules. | ||
|
||
The following table describes the fields you can set to configure | ||
the collation: | ||
|
||
.. list-table:: | ||
:widths: 30 70 | ||
:header-rows: 1 | ||
|
||
* - Field | ||
- Description | ||
|
||
* - ``locale`` | ||
- | *(Required)* Specifies the International Components for Unicode (ICU) locale. For a | ||
list of supported locales, see :manual:`Collation Locales and Default Parameters | ||
</reference/collation-locales-defaults/#supported-languages-and-locales>` | ||
in the {+mdb-server+} manual. | ||
| | ||
| **Data Type**: {+string-data-type+} | ||
|
||
* - ``caseLevel`` | ||
- | *(Optional)* Specifies whether to include case comparison. | ||
| | ||
| When set to ``true``, the comparison behavior depends on the value of | ||
the ``strength`` field: | ||
| | ||
- If ``strength`` is ``1``, the {+library-short+} compares base | ||
characters and case. | ||
| | ||
- If ``strength`` is ``2``, the {+library-short+} compares base | ||
characters, diacritics, other secondary differences, and case. | ||
| | ||
- If ``strength`` is any other value, this field is ignored. | ||
|
||
| When set to ``false``, the {+library-short+} doesn't include case comparison at | ||
strength level ``1`` or ``2``. | ||
| | ||
| **Data Type**: {+bool-data-type+} | ||
| **Default**: ``false`` | ||
|
||
* - ``caseFirst`` | ||
- | *(Optional)* Specifies the sort order of case differences during tertiary | ||
level comparisons. | ||
| | ||
| **Data Type**: {+string-data-type+} | ||
| **Default**: ``"off"`` | ||
|
||
* - ``strength`` | ||
- | *(Optional)* Specifies the level of comparison to perform, as defined in the | ||
`ICU documentation <https://unicode-org.github.io/icu/userguide/collation/concepts.html#comparison-levels>`__. | ||
| | ||
| **Data Type**: {+int-data-type+} | ||
| **Default**: ``3`` | ||
|
||
* - ``numericOrdering`` | ||
- | *(Optional)* Specifies whether the driver compares numeric strings as numbers. | ||
| | ||
| If set to ``true``, the {+library-short+} compares numeric strings as numbers. | ||
For example, when comparing the strings "10" and "2", the library uses the | ||
strings' numeric values and treats "10" as greater than "2". | ||
| | ||
| If set to ``false``, the {+library-short+} compares numeric strings | ||
as strings. For example, when comparing the strings "10" and "2", the library | ||
compares one character at a time and treats "10" as less than "2". | ||
| | ||
| For more information, see :manual:`Collation Restrictions </reference/collation/#restrictions>` | ||
in the {+mdb-server+} manual. | ||
| | ||
| **Data Type**: {+bool-data-type+} | ||
| **Default**: ``false`` | ||
|
||
* - ``alternate`` | ||
- | *(Optional)* Specifies whether the library considers whitespace and punctuation as base | ||
characters for comparison purposes. | ||
| | ||
| **Data Type**: {+string-data-type+} | ||
| **Default**: ``"non-ignorable"`` | ||
|
||
* - ``maxVariable`` | ||
- | *(Optional)* Specifies which characters the library considers ignorable when | ||
the ``alternate`` field is set to ``"shifted"``. | ||
| | ||
| **Data Type**: {+string-data-type+} | ||
| **Default**: ``"punct"`` | ||
|
||
* - ``backwards`` | ||
- | *(Optional)* Specifies whether strings containing diacritics sort from the back of the string | ||
to the front. | ||
| | ||
| **Data Type**: {+bool-data-type+} | ||
| **Default**: ``false`` | ||
|
||
To learn more about collation, see the :manual:`Collation </reference/collation>` | ||
entry in the {+mdb-server+} manual. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[s] I wonder if it would be helpful to note that they can learn about the possible values in this entry? Since the table here doesn't include an exhaustive list it may be helpful to call out.