Exposed the LevelDB iterator in the DB struct.

This commit is contained in:
Paul W. Homer
2017-03-17 13:27:20 -04:00
parent eac3f2bc14
commit bb8104b624
3 changed files with 27 additions and 0 deletions

8
db.go
View File

@ -12,6 +12,8 @@ type DB interface {
NewBatch() Batch
// For debugging
Iterator() Iterator
Next(Iterator) (key []byte, value []byte)
Print()
}
@ -21,6 +23,12 @@ type Batch interface {
Write()
}
type Iterator interface {
Next() bool
Key() []byte
Value() []byte
}
//-----------------------------------------------------------------------------
const (