@infra-blocks/aws-dynamodb
v0.83.0
Published
A convenience wrapper over @aws-sdk/client-dynamodb and @aws-sdk/lib-dynamodb.
Readme
ts-aws-dynamodb
A convenience library wrapper around @aws-sdk/client-dynamodb and
@aws-sdk/lib-dynamodb. The wrapper offers:
- A type safe expression language that automatically handles the aliasing of attribute names and values.
- More conventional field names. Input and output fields use the more common
camelCaseJS/TS convention over thePascalCaseimposed by the AWS APIs. - Pagination is provided for APIs that support it and exposed as
AsyncIterators.
Noteworthy divergences in naming
TransactWriteItems(dis engrish?) is renamed toWriteTransaction.DeleteIemandPutItem's return payload contains anitemfield, and not andAttributesfield. This is because the user can only specifyALL_OLDas optional return value, which will always return a full item.- The above is unlike the
UpdateItemcommand, which can return attributes subsets whenUPDATED_[NEW|OLD]is specified. So, theUpdateItemOutputcontains anattributesfield instead ofitemfield.
