MockingMagician / promised-db

Promised version of indexed DB that simplify usage
ISC License
2 stars 1 forks source link

objectStore.add should return the object key #6

Closed retorquere closed 1 month ago

retorquere commented 1 month ago

According to this:

If the operation is successful, the value of the request's result property is the key for the new record.

it should not return void

MockingMagician commented 1 month ago

My choice was completely biased. I was deviating a little from the indexedDB API, but at the same time, why return the value of a key you already know?

The answer: auto-increment, so yes, it's better all the same, thank you!