select method
The Select
operation returns a set of attributes for
ItemNames
that match the select expression.
Select
is similar to the standard SQL SELECT statement.
The total size of the response cannot exceed 1 MB in total size. Amazon
SimpleDB automatically adjusts the number of items returned per page to
enforce this limit. For example, if the client asks to retrieve 2500
items, but each individual item is 10 kB in size, the system returns 100
items and an appropriate NextToken
so the client can access
the next page of results.
For information on how to construct select expressions, see Using Select to Create Amazon SimpleDB Queries in the Developer Guide.
May throw InvalidParameterValue. May throw InvalidNextToken. May throw InvalidNumberPredicates. May throw InvalidNumberValueTests. May throw InvalidQueryExpression. May throw MissingParameter. May throw NoSuchDomain. May throw RequestTimeout. May throw TooManyRequestedAttributes.
Parameter selectExpression
:
The expression used to query the domain.
Parameter consistentRead
:
Determines whether or not strong consistency should be enforced when data
is read from SimpleDB. If true
, any data previously written
to SimpleDB will be returned. Otherwise, results will be consistent
eventually, and the client may not see data that was written immediately
before your read.
Parameter nextToken
:
A string informing Amazon SimpleDB where to start the next list of
ItemNames
.
Implementation
Future<SelectResult> select({
required String selectExpression,
bool? consistentRead,
String? nextToken,
}) async {
ArgumentError.checkNotNull(selectExpression, 'selectExpression');
final $request = <String, dynamic>{};
$request['SelectExpression'] = selectExpression;
consistentRead?.also((arg) => $request['ConsistentRead'] = arg);
nextToken?.also((arg) => $request['NextToken'] = arg);
final $result = await _protocol.send(
$request,
action: 'Select',
version: '2009-04-15',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['SelectRequest'],
shapes: shapes,
resultWrapper: 'SelectResult',
);
return SelectResult.fromXml($result);
}