MultiResultItem class sealed
One item in a multi-result response.
Sealed class hierarchy added in v3.2.0 (M3 fix). Use pattern matching to distinguish the variant:
for (final item in items) {
switch (item) {
case MultiResultItemResultSet(:final value):
print('rows=${value.rowCount}');
case MultiResultItemRowCount(:final value):
print('affected=$value');
}
}
The legacy two-field constructor
(MultiResultItem(resultSet:..., rowCount:...)) is preserved as a
deprecated factory so existing code keeps compiling for one minor cycle.
- Implementers
Constructors
- MultiResultItem({required ParsedRowBuffer? resultSet, required int? rowCount})
-
Legacy constructor preserved for one minor cycle. Prefer building items
via MultiResultItemResultSet or MultiResultItemRowCount directly.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- resultSet → ParsedRowBuffer?
-
Backward-compatible accessor: returns the result set if this is a
MultiResultItemResultSet, otherwise
null.no setter - rowCount → int?
-
Backward-compatible accessor: returns the row count if this is a
MultiResultItemRowCount, otherwise
null.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited