From 2b71a94d1f031331a548ed5431bcf30943e2c315 Mon Sep 17 00:00:00 2001 From: Ahsan Barkati Date: Fri, 23 Oct 2020 17:59:26 +0530 Subject: [PATCH] Add ValueUint64 api for skiplist iterator (#1575) Add method to get uint64 value from skiplist iterator. --- skl/skl.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/skl/skl.go b/skl/skl.go index 8f4b936b7..4e1fcd4a7 100644 --- a/skl/skl.go +++ b/skl/skl.go @@ -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())