diff options
Diffstat (limited to 'src/dedo.go')
-rw-r--r-- | src/dedo.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/dedo.go b/src/dedo.go index 2afcc01..d8655bb 100644 --- a/src/dedo.go +++ b/src/dedo.go @@ -61,9 +61,14 @@ import ( +type CursorI interface{ + First() ([]byte, []byte) + Next() ([]byte, []byte) +} + type SnapshotI interface{ Bucket([]byte) *bucketT - Cursor() *cursorT + Cursor() CursorI ForEach(func([]byte, *bucketT) error) error WriteTo(io.Writer) (int64, error) @@ -72,7 +77,7 @@ type SnapshotI interface{ type TransactionI interface{ Bucket([]byte) *bucketT - Cursor() *cursorT + Cursor() CursorI ForEach(func([]byte, *bucketT) error) error WriteTo(io.Writer) (int64, error) @@ -3552,7 +3557,7 @@ func txCursor(tx *transactionT) *cursorT { return tx.root.Cursor() } -func (tx *transactionT) Cursor() *cursorT { +func (tx *transactionT) Cursor() CursorI { return txCursor(tx) } |