diff options
Diffstat (limited to 'vendor/gitea.com/lunny/nodb/store/goleveldb/iterator.go')
-rw-r--r-- | vendor/gitea.com/lunny/nodb/store/goleveldb/iterator.go | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/vendor/gitea.com/lunny/nodb/store/goleveldb/iterator.go b/vendor/gitea.com/lunny/nodb/store/goleveldb/iterator.go new file mode 100644 index 0000000000..c1fd8b5573 --- /dev/null +++ b/vendor/gitea.com/lunny/nodb/store/goleveldb/iterator.go @@ -0,0 +1,49 @@ +package goleveldb + +import ( + "github.com/syndtr/goleveldb/leveldb/iterator" +) + +type Iterator struct { + it iterator.Iterator +} + +func (it *Iterator) Key() []byte { + return it.it.Key() +} + +func (it *Iterator) Value() []byte { + return it.it.Value() +} + +func (it *Iterator) Close() error { + if it.it != nil { + it.it.Release() + it.it = nil + } + return nil +} + +func (it *Iterator) Valid() bool { + return it.it.Valid() +} + +func (it *Iterator) Next() { + it.it.Next() +} + +func (it *Iterator) Prev() { + it.it.Prev() +} + +func (it *Iterator) First() { + it.it.First() +} + +func (it *Iterator) Last() { + it.it.Last() +} + +func (it *Iterator) Seek(key []byte) { + it.it.Seek(key) +} |