()
| 9 | const client = new DynamoDBClient({}); |
| 10 | |
| 11 | export const main = async () => { |
| 12 | const command = new ScanCommand({ |
| 13 | FilterExpression: "CrustType = :crustType", |
| 14 | // For more information about data types, |
| 15 | // see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes and |
| 16 | // https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.LowLevelAPI.html#Programming.LowLevelAPI.DataTypeDescriptors |
| 17 | ExpressionAttributeValues: { |
| 18 | ":crustType": { S: "Graham Cracker" }, |
| 19 | }, |
| 20 | ProjectionExpression: "Flavor, CrustType, Description", |
| 21 | TableName: "Pies", |
| 22 | }); |
| 23 | |
| 24 | const response = await client.send(command); |
| 25 | for (const pie of response.Items) { |
| 26 | console.log(`${pie.Flavor.S} - ${pie.Description.S}\n`); |
| 27 | } |
| 28 | return response; |
| 29 | }; |
| 30 | // snippet-end:[dynamodb.JavaScript.table.scanV3] |
| 31 | |
| 32 | // Invoke main function if this file was run directly. |
no test coverage detected