INNER CODE UNIT · JavaScript
test
sensedeep/dynamodb-onetable · samples/overview/src/index.js:67
async function test() {
/*
For this sample, create the table. Normally would be created separately.
*/
await table.createTable()
/*
Get OneTable entities. You can use these models for create/read/write etc. Or you can use table.*('Account').
*/
const Account = table.getModel('Account')
const Invoice = table.getModel('Invoice')
const Product = table.getModel('Product')
const User = table.getModel('User')
/*
Create account. This will allocate an account ID (ULID) and create item in primary and
secondary index.
*/