Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yamamotok/ddb-table-util
DynamoDB table utility
https://github.com/yamamotok/ddb-table-util
aws-dynamodb dynamodb typescript
Last synced: about 1 month ago
JSON representation
DynamoDB table utility
- Host: GitHub
- URL: https://github.com/yamamotok/ddb-table-util
- Owner: yamamotok
- Created: 2021-12-21T15:11:41.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-12T10:11:28.000Z (about 1 year ago)
- Last Synced: 2023-11-12T11:21:13.322Z (about 1 year ago)
- Topics: aws-dynamodb, dynamodb, typescript
- Language: TypeScript
- Homepage:
- Size: 210 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
DynamoDB Table Util
----------------------Tiny DynamoDB utility for projects in TypeScript.
## Basic Operation
- get
- put
- update
- delete
- scan
- scanAll
- query
- queryWithPagination
- queryAll## Conditional operation
- putIfNotExists (no exception is thrown even if the target already exists.)
- putIfExists (no exception is thrown even if the target does not exist.)
## Transaction
- transactional put
- transactional putIfNotExists
- transactional putIfExists```typescript
const pending1 = util.transactionalPut(input1);
const pending2 = util.transactionalPut(input2);
await Transaction.begin(util, pending1, pending2).commit();
```## Batch operation
TODO: will be implemented.## Peer dependencies
- @aws-sdk/client-dynamodb
- @aws-sdk/lib-dynamodb--------
## Library development
Before running unit tests, need to set up DynamoDB local version. See [docker-compose.yml](./docker-compose.yml)
and [scripts/dynamodb.sh](./scripts/dynamodb.sh).--------
© Keisuke Yamamoto