getWorkUnitResults method
Returns the work units resulting from the query. Work units can be executed in any order and in parallel.
May throw AccessDeniedException.
May throw ExpiredException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw ThrottledException.
Parameter queryId :
The ID of the plan query operation for which to get results.
Parameter workUnitId :
The work unit ID for which to get results. Value generated by enumerating
WorkUnitIdMin to WorkUnitIdMax (inclusive) from
the WorkUnitRange in the output of GetWorkUnits.
Parameter workUnitToken :
A work token used to query the execution service. Token output from
GetWorkUnits.
Implementation
Future<GetWorkUnitResultsResponse> getWorkUnitResults({
required String queryId,
required int workUnitId,
required String workUnitToken,
}) async {
_s.validateNumRange(
'workUnitId',
workUnitId,
0,
1152921504606846976,
isRequired: true,
);
final $payload = <String, dynamic>{
'QueryId': queryId,
'WorkUnitId': workUnitId,
'WorkUnitToken': workUnitToken,
};
final response = await _protocol.sendRaw(
payload: $payload,
method: 'POST',
requestUri: '/GetWorkUnitResults',
exceptionFnMap: _exceptionFns,
);
return GetWorkUnitResultsResponse(
resultStream: await response.stream.toBytes(),
);
}