A single MongoDB document as internal database/storage #127
Replies: 1 comment 1 reply
-
I started a draft PR 3 months ago to support IDs as strings (as primary IDs are in mongodb) but you can do without too! I'm not sure how your custom CRUD interface works, but you could also use You would set the This means that you wouldn't need to perform multiple "intra-document" mongodb requests: just a fetch and a push. And you can almost view this as a "transaction" because if the manager throws an error during the process, your tournament data will stay untouched. |
Beta Was this translation helpful? Give feedback.
-
Based on the CRUDInterface implementation of Json database example, I made a CRUDInterface that takes in a single "tournament" mongo document as the internal database/storage. And it "works" but Im not sure if this is intended use...
I like that since all updates are done in one document, changes in multiple fields are atomic and requires no more than one database write.
What do you think are problems with this approach if at all?
Beta Was this translation helpful? Give feedback.
All reactions