getMaxTs method

Future<int?> getMaxTs(
  1. ChangeSuperType changeSuperType
)

Implementation

Future<int?> getMaxTs(ChangeSuperType changeSuperType) async {
  if (!initialized) throw ArgumentError(AbstractDao.C_MUST_INIT);
  int? latestTs = 0;
  List<ChangeType> changeList = getChangeListFromSuperType(changeSuperType);
  try {
    latestTs = (await waterLineFieldDao.getMaxWaterLineFieldDto(changeList))
        .remote_ts;
  } on SqlException catch (e) {
    if (e.sqlExceptionEnum == SqlExceptionEnum.ENTRY_NOT_FOUND ||
        e.sqlExceptionEnum == SqlExceptionEnum.FAILED_SELECT) {
    } else
      rethrow;
  }
  return latestTs;
}