Put saves the specified key/value pair to the bucket. Keys that do not already exist are added and keys that already exist are overwritten.

Returns the following errors as required by the interface contract:

- ErrKeyRequired if the key is empty
- ErrIncompatibleValue if the key is the same as an existing bucket
- ErrTxNotWritable if attempted against a read-only transaction
- ErrTxClosed if the transaction has already been closed

This function is part of the database.Bucket interface implementation.

Put is referenced in 1 repository