Remove Prev from Iterator

This commit is contained in:
Jae Kwon
2017-12-12 14:45:31 -08:00
parent 0d03cd9e31
commit 7f650cea86
6 changed files with 15 additions and 223 deletions

View File

@ -90,17 +90,11 @@ type Iterator interface {
Valid() bool
// Next moves the iterator to the next sequential key in the database, as
// defined by the Comparator in the ReadOptions used to create this Iterator.
// defined by order of iteration.
//
// If Valid returns false, this method will panic.
Next()
// Prev moves the iterator to the previous sequential key in the database, as
// defined by the Comparator in the ReadOptions used to create this Iterator.
//
// If Valid returns false, this method will panic.
Prev()
// Key returns the key of the cursor.
//
// If Valid returns false, this method will panic.
@ -120,3 +114,8 @@ type Iterator interface {
// Release deallocates the given Iterator.
Release()
}
// For testing convenience.
func bz(s string) []byte {
return []byte(s)
}