LiteDB
LiteDB copied to clipboard
[QUESTION] Is Upsert supposed to work like it does currently?
Currently in the latest LiteDB 5.0.2.1, On Mac, .NET 9, Upsert only returns 'true' when inserting a new document in a new document collection. Otherwise it returns false even if it successfully adds or update a document in an existing document collection.
I thought it was a bit strange as well when I first tried using the upsert function.
If I were to change this, I would return a struct object which contains added and updated counts.
There's this item from 5!!! years ago when it was said that documentation should be updated - https://github.com/litedb-org/LiteDB/issues/1410 - but that appears not to be the case yet.