aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2015-10-28 11:54:20 -0600
committerBen Johnson <benbjohnson@yahoo.com>2015-10-28 11:54:20 -0600
commit54e1e448664b27e3e99b7ce9f7ff0a0dfe3f34b6 (patch)
treec0679ec246569657df8405c027c773b1652fca4b
parentMerge pull request #445 from benbjohnson/reading (diff)
parentbucket: document Put() value must remain valid for the transaction (diff)
downloaddedo-54e1e448664b27e3e99b7ce9f7ff0a0dfe3f34b6.tar.gz
dedo-54e1e448664b27e3e99b7ce9f7ff0a0dfe3f34b6.tar.xz
Merge pull request #441 from pmezard/document-put-constraint
bucket: document Put() value must remain valid for the transaction
-rw-r--r--bucket.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/bucket.go b/bucket.go
index 2925288..4dea157 100644
--- a/bucket.go
+++ b/bucket.go
@@ -273,6 +273,7 @@ func (b *Bucket) Get(key []byte) []byte {
// Put sets the value for a key in the bucket.
// If the key exist then its previous value will be overwritten.
+// Supplied value must remain valid for the life of the transaction.
// Returns an error if the bucket was created from a read-only transaction, if the key is blank, if the key is too large, or if the value is too large.
func (b *Bucket) Put(key []byte, value []byte) error {
if b.tx.db == nil {