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.

The interface contract guarantees at least the following errors will be returned (other implementation-specific errors are possible):

- 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

NOTE: The slices passed to this function must NOT be modified by the caller. This constraint prevents the requirement for additional data copies and allows support for memory-mapped database implementations.

Put is referenced in 2 repositories