put duplicate #120
-
Hi, I have a question on what happens on put when the key is duplicate. But when it's false, and I do a put, it appends anyway. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Doing a
LMDB does have an option for doing
Both of these will (return a promise that) resolves to false if there is already an existing entry. |
Beta Was this translation helpful? Give feedback.
Doing a
put
withdupSort: false
with an entry that already exists will replace it. So:LMDB does have an option for doing
put
s that will only execute if there is no existing entry and fail if there is an existing entry:Both of these will (return a promise that) resolves to false if there is already an existing entry.