diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-11-27 17:18:05 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-11-27 17:18:05 -0700 |
commit | 74489c7516ec9fcd5f2e79502c16900a254af647 (patch) | |
tree | c300926c20844bab69cfc3d0dadd3279679462c0 | |
parent | Merge pull request #265 from benbjohnson/arm (diff) | |
download | dedo-74489c7516ec9fcd5f2e79502c16900a254af647.tar.gz dedo-74489c7516ec9fcd5f2e79502c16900a254af647.tar.xz |
Clarify cursor behavior after mutation.
-rw-r--r-- | cursor.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -8,6 +8,10 @@ import ( // Cursor represents an iterator that can traverse over all key/value pairs in a bucket in sorted order. // Cursors see nested buckets with value == nil. // Cursors can be obtained from a transaction and are valid as long as the transaction is open. +// +// Changing data while traversing with a cursor may cause it to be invalidated +// and return unexpected keys and/or values. You must reposition your cursor +// after mutating data. type Cursor struct { bucket *Bucket stack []elemRef |