mdb_cursor_del function

int mdb_cursor_del(
  1. Pointer<MDB_cursor> cursor,
  2. int flags
)

@brief Delete current key/data pair

This function deletes the key/data pair to which the cursor refers. This does not invalidate the cursor, so operations such as MDB_NEXT can still be used on it. Both MDB_NEXT and MDB_GET_CURRENT will return the same record after this operation. @paramin cursor A cursor handle returned by #mdb_cursor_open() @paramin flags Options for this operation. This parameter must be set to 0 or one of the values described here.

  • #MDB_NODUPDATA - delete all of the data items for the current key. This flag may only be specified if the database was opened with #MDB_DUPSORT.
@return A non-zero error value on failure and 0 on success. Some possible errors are:
  • EACCES - an attempt was made to write in a read-only transaction.
  • EINVAL - an invalid parameter was specified.

Implementation

@ffi.FfiNative<ffi.Int Function(ffi.Pointer<MDB_cursor>, ffi.UnsignedInt)>(
    'mdb_cursor_del')
external int mdb_cursor_del(
  ffi.Pointer<MDB_cursor> cursor,
  int flags,
);