Optional
convertEntityFormatter
Optional
gsisA map of GSI ID to generator functions, similar to pk() and sk() Note that the GSI IDs do not have to be the same as the underlying index names, rather they must be the same IDs as those defined in the table configuration (e.g. 'gsi', 'gsi2', if using "standard" configuration.)
EntityParser
Must be unique for each Entity used in the store, but can be any string. For tables that store multiple entities the type is stored as a meta attribute on the table
Given a subset of the fields of the entity type, generate the partition key value for the stored version of the object Note that this may be as simple as returning a specific property on the object, but for "single table designs" will often be some kind of encoding of one more fields
Given a subset of the fields of the entity type, generate the sort key value for the stored version of the object. This field is required for Entity, since most usages of DynamoDB include a sort key. However if your entity is stored in a table without a sort key then see PKOnlyEntity for a version of Entity that only requires a partition key Note that this may be as simple as returning a specific property on the object, but for "single table designs" will often be some kind of encoding of one more fields
Generated using TypeDoc
Every object stored via Entity Store must have a corresponding Entity. Each entity must be related to a type (
TItem
) that must at least define the table key fields, and optionally the other fields of the internal representation of an object