Skip to content

DOCSP-49849 - Collation #628

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

Open
wants to merge 4 commits into
base: docsp-45382-comp-cvg
Choose a base branch
from

Conversation

mongoKart
Copy link
Collaborator

@mongoKart mongoKart commented May 7, 2025

I wanted to incorporate this into the Server docs but it didn't fit there neatly.

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-49849

Staging Links

  • crud/bulk-write
  • crud/delete
  • crud/query/count
  • crud/query/distinct
  • crud/query/find
  • crud/replace
  • logging-and-monitoring/change-streams
  • Self-Review Checklist

    • Is this free of any warnings or errors in the RST?
    • Did you run a spell-check?
    • Did you run a grammar-check?
    • Are all the links working?

    Copy link

    netlify bot commented May 7, 2025

    Deploy Preview for docs-csharp ready!

    Name Link
    🔨 Latest commit ed9d6bc
    🔍 Latest deploy log https://app.netlify.com/sites/docs-csharp/deploys/681d219c244ab900087c697b
    😎 Deploy Preview https://deploy-preview-628--docs-csharp.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    Copy link
    Collaborator

    @rachel-mack rachel-mack left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    I think you could improve this:

    - ``Locale``

    * - ``alternate``
    - | Optional. Specifies whether the driver considers whitespace and punctuation as base
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    The other table in this doc set uses italics for *Optional.*, but the style guide uses (*Optional)*
    I'll leave it up to you.


    * - ``alternate``
    - | Optional. Specifies whether the driver considers whitespace and punctuation as base
    characters for purposes of comparison.
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    I would add an **Accepted Values:** section

    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    For all of the C# enum data types, I linked to the relevant API page, which documents the possible options. Similar for the string types linking to a page with the accepted options.

    - ``Backwards``

    * - ``caseFirst``
    - | Optional. Specifies the sort order of case differences during tertiary level comparisons.
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    **Accepted Values:**

    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    see above

    Comment on lines 52 to 63
    - | Optional. Specifies whether to include case comparison at strength level ``Primary`` or
    ``Secondary``.
    |
    | When this argument is ``true``:
    |
    | - If the strength is ``Primary``, the driver compares base
    characters and case.
    | - If the strength is ``Secondary``, the driver compares base
    characters, diacritics, other secondary differences, and case.
    |
    | When this argument is ``false``, the driver doesn't include case comparison at
    strength level ``Primary`` or ``Secondary``.
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    If there's a way to add a link to the strength parameter, I would do that here. I'm assuming this is why you were asking about nesting tables the other day, because that would make sense here.

    Suggested change
    - | Optional. Specifies whether to include case comparison at strength level ``Primary`` or
    ``Secondary``.
    |
    | When this argument is ``true``:
    |
    | - If the strength is ``Primary``, the driver compares base
    characters and case.
    | - If the strength is ``Secondary``, the driver compares base
    characters, diacritics, other secondary differences, and case.
    |
    | When this argument is ``false``, the driver doesn't include case comparison at
    strength level ``Primary`` or ``Secondary``.
    - | Optional. Specifies whether to include case comparison.
    |
    | When this argument is ``true``, the behaviour depends on the value of the ``Strength`` property:
    |
    | - If the ``Strength`` property is ``Primary``, the driver compares base
    characters and case.
    | - If the ``Strength`` property is ``Secondary``, the driver compares base
    characters, diacritics, other secondary differences, and case.
    |
    | When this argument is ``false``, the driver doesn't include case comparison.

    Copy link
    Collaborator Author

    @mongoKart mongoKart May 8, 2025

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    I don't know of a way to link to another table row. I could move strength above caseLevel but I just moved them to parameter order and that would throw it off.

    a note about the properties: they're read-only and set directly by these parameters, so i talk about the values of the parameters instead of the values of the properties.

    Comment on lines 70 to 71
    - | Optional. Specifies which characters the driver considers ignorable when
    ``Alternate`` is ``CollationAlternate.Shifted``.
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    add **Accepted Values:**

    Suggested change
    - | Optional. Specifies which characters the driver considers ignorable when
    ``Alternate`` is ``CollationAlternate.Shifted``.
    - | Optional. Specifies which characters the driver considers ignorable when the
    ``Alternate`` property is ``CollationAlternate.Shifted``.

    - ``MaxVariable``

    * - ``normalization``
    - | Optional. Specifies whether the driver normalizes text as needed.
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Maybe add an example

    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    how about a link to the ICU docs

    Comment on lines 90 to 92
    | If this argument is ``true``, the driver compares numeric strings as numbers.
    For example, "10" is greater than "2". If this argument is ``false`` or excluded,
    the driver compares numeric strings as strings. For example, "10" is less than "2".
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    They're not being treated as strings so I would leave out the "s, you could make them 10 and 2 if you want to differentiate them:

    Suggested change
    | If this argument is ``true``, the driver compares numeric strings as numbers.
    For example, "10" is greater than "2". If this argument is ``false`` or excluded,
    the driver compares numeric strings as strings. For example, "10" is less than "2".
    | If this argument is ``true``, the driver compares numeric strings as numbers.
    For example, 10 is greater than 2.
    |
    | If this argument is ``false`` or excluded,
    the driver compares numeric strings as strings. For example, "10" is less than "2".

    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    they aren't being compared as strings, but they still are strings, so i think the quotes are useful. lmk if this change is clearer.

    Comment on lines 109 to 110
    For more information about collation, see the :manual:`Collation <reference/collation>`
    page in the {+mdb-server+} manual.
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    404

    Suggested change
    For more information about collation, see the :manual:`Collation <reference/collation>`
    page in the {+mdb-server+} manual.
    For more information about collation, see the :manual:`Collation </reference/collation>`
    page in the {+mdb-server+} manual.

    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Is this still being used?

    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    yeah, it's the page template for update-many and update-one

    @mongoKart mongoKart requested a review from rachel-mack May 8, 2025 21:26
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants