put method

Future<void> put(
  1. OpLogEntry entry
)
inherited

Implementation

Future<void> put(OpLogEntry<dynamic> entry) async {
  try {
    isar.writeTxnSync(() {
      isar.opLogs.putSync(entry
          .copyWith(
            clientReferenceId: getClientReferenceId(entry.entity),
            serverGeneratedId: getServerGeneratedId(entry.entity),
            rowVersion: getRowVersion(entry.entity),
            nonRecoverableError: getNonRecoverableError(entry.entity),
          )
          .oplog);
    });
  } catch (e) {
    if (kDebugMode) {
      print('error in isar ${e}');
    }
    rethrow;
  }

  return;
}