getFirstResultSet static method
Returns the first result set from a multi-result response, or null
when the batch produced no cursors at all (e.g. INSERT-only batch).
Breaking change in v3.2.0 (M7 fix) — pre-v3.2 returned a fake empty
ParsedRowBuffer which made it impossible to distinguish "0 rows" from
"no result set was produced". Callers can recover the old behaviour
with getFirstResultSet(items) ?? const ParsedRowBuffer(...).
Implementation
static ParsedRowBuffer? getFirstResultSet(List<MultiResultItem> items) {
for (final item in items) {
if (item is MultiResultItemResultSet) {
return item.value;
}
}
return null;
}