Generates a partial DynamoDB CreateTableCommandInput object for a given EntityManager. Properties generated:
CreateTableCommandInput
AttributeDefinitions
GlobalSecondaryIndexes
KeySchema
const entityManager = new EntityManager(config);const entityClient = new EntityClient({region: 'us-east-1});const tableDefinition = generateTableDefinition(entityManager);await entityClient.createTable({...tableDefinition, TableName: 'user'}); Copy
const entityManager = new EntityManager(config);const entityClient = new EntityClient({region: 'us-east-1});const tableDefinition = generateTableDefinition(entityManager);await entityClient.createTable({...tableDefinition, TableName: 'user'});
EntityManager instance.
EntityManager
TranscodeAttributeTypeMap object linking non-string transcodes to a DynamoDB ScalarAttributeType. Defaults to defaultTranscodeAttributeTypeMap.
TranscodeAttributeTypeMap
ScalarAttributeType
defaultTranscodeAttributeTypeMap
Partial DynamoDB CreateTableCommandInput object.
Generates a partial DynamoDB
CreateTableCommandInput
object for a given EntityManager. Properties generated:AttributeDefinitions
GlobalSecondaryIndexes
KeySchema
Example