deleteById method

  1. @override
Future<bool> deleteById(
  1. int id
)

Implementation

@override
Future<bool> deleteById(int id) async {
  final isDeleted = await _indexDB.deleteById(id);
  // disk ထဲရေးသွင်း
  await _indexDB.writeFlush();
  // autoCompact
  await _indexDB.mabyCompact();

  notify(
    TBEventType.delete,
    id,
    _adapter.getUniqueFieldId(),
    errorMessage: isDeleted ? null : 'Deleted Failed!',
  );

  return isDeleted;
}