iterator add skip

This commit is contained in:
siddontang 2014-05-07 16:57:51 +08:00
parent 2dd6408d57
commit 8a593bd360
1 changed files with 8 additions and 0 deletions

View File

@ -136,6 +136,14 @@ func (it *Iterator) Next() {
}
}
func (it *Iterator) Skip(offset int64) {
for i := 0; i < offset; i++ {
if it.Valid() {
it.Next()
}
}
}
func (it *Iterator) Key() []byte {
return it.it.Key()
}