INNER CODE UNIT · JavaScript
test
sensedeep/dynamodb-onetable · samples/packed/src/index.js:80
async function test() {
if (!(await table.exists())) {
await table.createTable()
}
/*
The address, city and zip properties are packed into the single 'data' attribute.
All packed properties must be provided.
*/
let user = await User.create(
{
name: 'Peter Smith',
zip: 98011,
address: '444 Cherry Tree Lane',
city: 'Seattle',
},
{log: true}
) // Emit console trace for the command and result