INNER CODE UNIT · TypeScript
test
sensedeep/dynamodb-onetable · samples/typescript/src/index.ts:65
async function test() {
/*
For this sample, create the table. Normally would be created separately.
*/
await table.createTable()
/*
Create typed models. We can also access items using the table APIs. E.g. table.get('User', ...)
*/
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.
*/