get method
Returns a set of attributes for the item with the given primary key by delegating to DynamoDB.getItem().
Implementation
Future<GetOutput> get({
required String tableName,
required Map<String, dynamic> key,
List<String>? attributesToGet,
bool? consistentRead,
Map<String, String>? expressionAttributeNames,
String? projectionExpression,
ReturnConsumedCapacity? returnConsumedCapacity,
}) async {
final getItemOutput = await dynamoDB.getItem(
key: key.fromJsonToAttributeValue(),
tableName: tableName,
attributesToGet: attributesToGet,
consistentRead: consistentRead,
expressionAttributeNames: expressionAttributeNames,
projectionExpression: projectionExpression,
returnConsumedCapacity: returnConsumedCapacity);
return GetOutput(
getItemOutput.consumedCapacity,
getItemOutput.item.toJson() ?? {},
);
}