upsertList method
Implementation
Future<void> upsertList(final List<T> items) async {
if (items.isEmpty) return;
if (!(await _getTableInfo()).supportsNativeUpsert) {
await upsertListAndReturnIds(items);
return;
}
final batch = _database.batch();
for (final item in items) {
final values = _valueMapper(item);
final sql = _nativeUpsertSql ??= _getNativeUpsertSql(values.keys);
batch.rawInsert(sql, values.values.toList());
}
await batch.commit(noResult: true);
_changeListener?.notifyChange(_entityName);
}