setToDB method

Future<void> setToDB(
  1. AbsExModel model, {
  2. bool dontRealTime = false,
})

Implementation

Future<void> setToDB(AbsExModel model, {bool dontRealTime = false}) async {
  try {
    //await HycopFactory.dataBase!.setData(collectionId, model.mid, model.toMap());
    await HycopFactory.dataBase!.setModel(collectionId, model, dontRealTime: dontRealTime);
  } catch (e) {
    logger.severe('databaseError', e);
    throw HycopException(message: 'databaseError', exception: e as Exception);
  }
}