Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Miheev committed Jun 17, 2024
1 parent e921652 commit 6377162
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions mdbx/cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,10 @@ func (c *Cursor) DBI() DBI {
//
// See mdb_cursor_get.
func (c *Cursor) Get(setkey, setval []byte, op uint) (key, val []byte, err error) {
switch {
case len(setkey) == 0 && len(setval) == 0:
err = c.getVal0(op)
case len(setkey) == 0:
err = c.getVal01(setval, op)
case len(setval) == 0:
err = c.getVal1(setkey, op)
default:
if len(setkey) != 0 || len(setval) != 0 {
err = c.getVal2(setkey, setval, op)
} else {
err = c.getVal0(op)
}
if err != nil {
c.txn.key = C.MDBX_val{}
Expand Down

0 comments on commit 6377162

Please sign in to comment.