put

suspend fun ObjectStore.put(item: dynamic): dynamic

Adds an item to or updates an item in the database using an in-line or auto-incrementing key. If an item with the same key already exists, this will replace that item. Note that with auto-incrementing keys a new item will always be inserted.

This API is delicate. If you're passing in Kotlin objects directly, you're probably doing it wrong.

Generally, you'll want to create an explicit external interface and pass that in, to guarantee that Kotlin doesn't mangle, prefix, or otherwise mess with your field names.


suspend fun ObjectStore.put(item: dynamic, key: Key): dynamic

Adds an item to or updates an item in the database using an explicit out-of-line key. If an item with the same key already exists, this will replace that item.

This API is delicate. If you're passing in Kotlin objects directly, you're probably doing it wrong.

Generally, you'll want to create an explicit external interface and pass that in, to guarantee that Kotlin doesn't mangle, prefix, or otherwise mess with your field names.