Skip to content
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

Allow duplicates in bson documents #1263

Closed
2 of 3 tasks
AlekSi opened this issue Oct 14, 2022 · 0 comments · Fixed by #1391
Closed
2 of 3 tasks

Allow duplicates in bson documents #1263

AlekSi opened this issue Oct 14, 2022 · 0 comments · Fixed by #1391
Assignees
Labels
code/chore Code maintenance improvements
Milestone

Comments

@AlekSi
Copy link
Member

AlekSi commented Oct 14, 2022

What should be done?

bson package should support documents with duplicate keys, even other layers reject them. That should make testing and fuzzing easier.

Where?

In bson package (just like in types package). Handlers are not in the scope.


  • Find the current issue's TODOs in the source code and modify them.
  • Check skipped tests.
  • Diff tests are written for insert.

Implementation comments

  • For insert: if there are duplicate keys, an error is returned (this should be documented in diff.md)
  • For update operators: if there are duplicate keys in the update document, an error is returned (see examples in TestUpdateFieldCompat* where * is an operator).
@AlekSi AlekSi added code/chore Code maintenance improvements not ready Issues that are not ready to be worked on; PRs that should skip CI labels Oct 14, 2022
@AlekSi AlekSi changed the title Allow duplicate in bson documents Allow duplicates in bson documents Oct 18, 2022
@AlekSi AlekSi removed the not ready Issues that are not ready to be worked on; PRs that should skip CI label Nov 7, 2022
@AlekSi AlekSi added this to the v0.6.2 milestone Nov 7, 2022
@rumyantseva rumyantseva self-assigned this Nov 10, 2022
@AlekSi AlekSi assigned AlekSi and unassigned AlekSi Nov 16, 2022
AlekSi pushed a commit that referenced this issue Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants