upsertReviewLog method

Future<void> upsertReviewLog(
  1. Map<String, dynamic> data
)

Idempotent insert for replay paths that have only the raw payload map (e.g. SyncWorker) rather than a ReviewLogModel. Requires data["id"] to exist.

Implementation

Future<void> upsertReviewLog(Map<String, dynamic> data) async {
  assert(data.containsKey('id'), 'upsertReviewLog requires data["id"]');
  await _client
      .from('review_log')
      .upsert(data, onConflict: 'id', ignoreDuplicates: true);
}