MCPcopy
hub / github.com/etcd-io/bbolt / Cursor

Method Cursor

bucket.go:74–83  ·  bucket.go::Bucket.Cursor

Cursor creates a cursor associated with the bucket. The cursor is only valid as long as the transaction is open. Do not use a cursor after the transaction is closed.

()

Source from the content-addressed store, hash-verified

72// The cursor is only valid as long as the transaction is open.
73// Do not use a cursor after the transaction is closed.
74func (b *Bucket) Cursor() *Cursor {
75 // Update transaction statistics.
76 b.tx.stats.IncCursorCount(1)
77
78 // Allocate and return a cursor.
79 return &Cursor{
80 bucket: b,
81 stack: make([]elemRef, 0),
82 }
83}
84
85// Bucket retrieves a nested bucket by name.
86// Returns nil if the bucket does not exist.

Callers 12

BucketMethod · 0.95
CreateBucketMethod · 0.95
DeleteBucketMethod · 0.95
MoveBucketMethod · 0.95
recursivelyInspectMethod · 0.95
GetMethod · 0.95
PutMethod · 0.95
DeleteMethod · 0.95
ForEachMethod · 0.95
ForEachBucketMethod · 0.95
spillMethod · 0.95

Calls 1

IncCursorCountMethod · 0.80

Tested by

no test coverage detected