deleteSingleType method

Future<bool> deleteSingleType({
  1. Dstu2ResourceType? resourceType,
  2. Resource? resource,
  3. String? pw,
})

pass in a resourceType or a resource, and db will delete all resources of that type - Note: will NOT delete any _historical stores (must pass in _history as the type for this to happen)

Implementation

Future<bool> deleteSingleType({
  Dstu2ResourceType? resourceType,
  Resource? resource,
  String? pw,
}) async {
  if (resourceType != null || resource?.resourceType != null) {
    resourceType ??= resource?.resourceType;
    return _deleteSingleType(
      resourceType: resourceType!,
    );
  }
  return false;
}