Skip to content

DOCSP-49237: bson vector subtype #152

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 5 commits into from
May 23, 2025

Conversation

rustagir
Copy link
Contributor

@rustagir rustagir commented May 21, 2025

Pull Request Info

PR Reviewing Guidelines

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

Staging Links

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?
  • Are the facets and meta keywords accurate?
  • Are the page titles greater than 20 characters long and SEO relevant?

Copy link

netlify bot commented May 21, 2025

Deploy Preview for docs-ruby ready!

Name Link
🔨 Latest commit 3c4df69
🔍 Latest deploy log https://app.netlify.com/projects/docs-ruby/deploys/682f567eca32390008625789
😎 Deploy Preview https://deploy-preview-152--docs-ruby.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 project configuration.

Copy link
Contributor

@comandeo-mongo comandeo-mongo 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 this is better to always use the full class name, with BSON:: prefix

Copy link
Contributor

@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.

Some suggestions:

Comment on lines 480 to 482
You can convert ``Vector`` and array objects to ``BSON::Binary`` objects
so they are serialized as BSON binary vector (subtype 9) instances. Use
the ``Binary.from_vector`` method, as shown in the following code:
Copy link
Contributor

Choose a reason for hiding this comment

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

You could include a link back up to the BSON:Binary section (maybe overkill)

But does the the list of valid subtypes from the Binary section need to be updated to include :vector as a possible type? Might be a good opportunity to review the list for completeness.

@rustagir rustagir requested a review from comandeo-mongo May 22, 2025 16:49
@rustagir rustagir merged commit 17eeb68 into mongodb:master May 23, 2025
5 checks passed
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.

3 participants