Closed gogoout closed 2 years ago
See even after remove key1, value2, it still get iterated. Is this the intended behaviour?
It should be removed, but you are removing the value from "key", not "key1":
await db.remove('key', 'value2'); // only remove the second value under key1
If you adjust that to 'key1' it should work.
I think when building secondary index(which presumably should be the primary use case for dupSort?)
Yes, that is definitely the primary use case. Were you suggesting different behavior for the puts, or just asking about how to remove a key/value from a dupSort table?
Sorry, stupid typo. And it works, thanks for point out. Just asking about the removal key/pair behaviour. Thanks for the great lib and quick response. Closed now.
Hi, when running my test, I found dupSort doesn't really unique the key and value pair. See following example:
See even after remove
key1
,value2
, it still get iterated. Is this the intended behaviour? I think when building secondary index(which presumably should be the primary use case for dupSort?) inserting with unique would be much easier, otherwise I think it's worth noted in the doc that user have to ensure the unqiue pair if needed.