The entity to which the decorator is applied.
The type constraint ensuring the field is suitable to be a partition key.
Optional
props: NonNullAttributeOptionsAn optional object of NonNullAttributeOptions, providing additional configuration for the partition key attribute, such as custom metadata.
A class field decorator function that targets and initializes the class's prototype to register the partition key with the ORM's metadata system.
Usage example:
class User extends TableClass {
@PartitionKeyAttribute()
public pk: PartitionKey;
}
In this example, @PartitionKeyAttribute
decorates the pk
field of User
, marking it as the entity's partition key.
Generated using TypeDoc
A decorator for designating the field for the partition key on the dynamo table.