cursorDelete method

Future<void> cursorDelete(
  1. Pointer<MDB_cursor> cursor, [
  2. int flags = 0
])

Deletes the entry at current cursor position

Parameters:

  • cursor - Active cursor
  • flags - Optional operation flags

Example:

// Position cursor and delete entry
final entry = await db.cursorGet(cursor, null, CursorOp.first);
if (entry != null) {
  await db.cursorDelete(cursor);
}

Implementation

Future<void> cursorDelete(Pointer<MDB_cursor> cursor, [int flags = 0]) async {
  final result = _lib.mdb_cursor_del(cursor, flags);
  if (result != 0) {
    throw LMDBException('Failed to delete at cursor', result);
  }
}