DynamoTable
Core class that represents a DynamoDB table.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DynamoTable(config): DynamoTable;Parameters
Section titled “Parameters”config
Section titled “config”Returns
Section titled “Returns”DynamoTable
Accessors
Section titled “Accessors”documentClient
Section titled “documentClient”Get Signature
Section titled “Get Signature”get documentClient(): DynamoDBDocumentClient;The DynamoDB Document Client instance used for operations.
Throws
Section titled “Throws”Error if no client has been provided via the constructor or initClient.
Returns
Section titled “Returns”DynamoDBDocumentClient
globalSecondaryIndexKeyNames
Section titled “globalSecondaryIndexKeyNames”Get Signature
Section titled “Get Signature”get globalSecondaryIndexKeyNames(): NamedGlobalSecondaryIndexKeyNames;The key names for the global secondary indexes defined on the table.
Returns
Section titled “Returns”NamedGlobalSecondaryIndexKeyNames
localSecondaryIndexKeyNames
Section titled “localSecondaryIndexKeyNames”Get Signature
Section titled “Get Signature”get localSecondaryIndexKeyNames(): NamedLocalSecondaryIndexKeyNames;The key names for the local secondary indexes defined on the table.
Returns
Section titled “Returns”NamedLocalSecondaryIndexKeyNames
partitionKeyName
Section titled “partitionKeyName”Get Signature
Section titled “Get Signature”get partitionKeyName(): string;The name of the partition key for the table.
Returns
Section titled “Returns”string
sortKeyName
Section titled “sortKeyName”Get Signature
Section titled “Get Signature”get sortKeyName(): string | null;The name of the sort key for the table, or null if the table does not have a sort key
(null would indicate a “simple” primary key).
Returns
Section titled “Returns”string | null
tableName
Section titled “tableName”Get Signature
Section titled “Get Signature”get tableName(): string;The name of the DynamoDB table.
Returns
Section titled “Returns”string
Methods
Section titled “Methods”initClient()
Section titled “initClient()”initClient(client): void;Sets the DynamoDB Document Client for this table, allowing the client to be initialized after table construction.
Parameters
Section titled “Parameters”client
Section titled “client”DynamoDBDocumentClient
Returns
Section titled “Returns”void
send()
Section titled “send()”send<CommandOutput>(command): Promise<CommandOutput>;Sends a table-level command to be executed against this table.
Type Parameters
Section titled “Type Parameters”CommandOutput
Section titled “CommandOutput”CommandOutput
Parameters
Section titled “Parameters”command
Section titled “command”TableCommand<CommandOutput>
Returns
Section titled “Returns”Promise<CommandOutput>