upsertSnapshots method

Future<int> upsertSnapshots({
  1. required String entityType,
  2. required Iterable<Map<String, Object?>> snapshots,
})

Implementation

Future<int> upsertSnapshots({
  required final String entityType,
  required final Iterable<Map<String, Object?>> snapshots,
}) async {
  final rows = snapshots.map(_snapshotRow).toList(growable: false);
  final result = await _invoke('upsertEntitySnapshots', <String, Object?>{
    'entityType': _entityType(entityType),
    'snapshots': rows,
  });
  return _intResult(result, fallback: rows.length);
}