removeStudy method

Future<void> removeStudy(
  1. Study<PrimaryDeviceDeployment> study
)

Remove the study from local cache.

Implementation

Future<void> removeStudy(Study study) async {
  info("$runtimeType - Erasing study, deploymentId: $study");
  try {
    await _database?.delete(
      STUDY_TABLE_NAME,
      where:
          '$STUDY_DEPLOYMENT_ID_COLUMN = ? AND '
          '$DEVICE_ROLE_NAME_COLUMN = ?',
      whereArgs: [study.studyDeploymentId, study.deviceRoleName],
    );
  } catch (exception) {
    warning('$runtimeType - Failed to erase deployment - $exception');
  }
}