From f3edece0bc2fa62171d287b6e13d588a8ab364c7 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Fri, 9 Jun 2023 21:41:06 +0700 Subject: [PATCH] docs: cursor dupsort example --- kv/kv_interface.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/kv/kv_interface.go b/kv/kv_interface.go index 3f27762ab..bd51347cd 100644 --- a/kv/kv_interface.go +++ b/kv/kv_interface.go @@ -469,6 +469,21 @@ type RwCursor interface { DeleteCurrent() error } +// CursorDupSort +// +// Example: +// +// for k, v, err = cursor.First(); k != nil; k, v, err = cursor.NextNoDup() { +// if err != nil { +// return err +// } +// for ; v != nil; _, v, err = cursor.NextDup() { +// if err != nil { +// return err +// } +// +// } +// } type CursorDupSort interface { Cursor