Skip to content

add Mongodb create#80

Open
neko782 wants to merge 2 commits into
maxcountryman:mainfrom
neko782:mongodb-create
Open

add Mongodb create#80
neko782 wants to merge 2 commits into
maxcountryman:mainfrom
neko782:mongodb-create

Conversation

@neko782

@neko782 neko782 commented Apr 19, 2026

Copy link
Copy Markdown

supersedes #16
written on top of #79, merging this will merge both

this is a pretty weird approach (fully atomic) so im up to changing if you dont like it

also i noticed that atomicity is technically not needed here - it would be perfectly fine to do .find and then .insert (which will fail in case of a race condition with a mongodb error if _id is colliding) but this approach seems better to me

Comment thread mongodb-store/src/lib.rs

self.collection
.update_one(
.replace_one(

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

prevents error of overriding _id

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.

1 participant