Skip to content

Commit a76bd2e

Browse files
committed
db: remove comment's reference to RefreshBatchSnapshot
The Iterator no longer exposes a RefreshBatchSnapshot method. Instead, the user must call SetOptions in order to refresh an Iterator's view of a mutated batch.
1 parent 82fc444 commit a76bd2e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

batch.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,8 +1274,7 @@ func (b *Batch) SetRepr(data []byte) error {
12741274
// SeekPrefixGE, SeekLT, First or Last. Only indexed batches support iterators.
12751275
//
12761276
// The returned Iterator observes all of the Batch's existing mutations, but no
1277-
// later mutations. Its view can be refreshed via RefreshBatchSnapshot or
1278-
// SetOptions().
1277+
// later mutations. Its view can be refreshed by calling SetOptions.
12791278
func (b *Batch) NewIter(o *IterOptions) (*Iterator, error) {
12801279
return b.NewIterWithContext(context.Background(), o)
12811280
}
@@ -1293,8 +1292,7 @@ func (b *Batch) NewIterWithContext(ctx context.Context, o *IterOptions) (*Iterat
12931292
// batch, and does not overlay the batch mutations on top of the DB state.
12941293
//
12951294
// The returned Iterator observes all of the Batch's existing mutations, but
1296-
// no later mutations. Its view can be refreshed via RefreshBatchSnapshot or
1297-
// SetOptions().
1295+
// no later mutations. Its view can be refreshed by calling SetOptions.
12981296
func (b *Batch) NewBatchOnlyIter(ctx context.Context, o *IterOptions) (*Iterator, error) {
12991297
if b.index == nil {
13001298
return nil, ErrNotIndexed

0 commit comments

Comments
 (0)