Skip to content

Commit

Permalink
Add ValueUint64 api for skiplist iterator (#1575)
Browse files Browse the repository at this point in the history
Add method to get uint64 value from skiplist iterator.
  • Loading branch information
ahsanbarkati authored Oct 23, 2020
1 parent a8d1f08 commit 2b71a94
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions skl/skl.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,11 @@ func (s *Iterator) Value() y.ValueStruct {
return s.list.arena.getVal(valOffset, valSize)
}

// ValueUint64 returns the uint64 value of the current node.
func (s *Iterator) ValueUint64() uint64 {
return s.n.value
}

// Next advances to the next position.
func (s *Iterator) Next() {
y.AssertTrue(s.Valid())
Expand Down

0 comments on commit 2b71a94

Please sign in to comment.