@deptno/dynamodb
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@deptno/dynamodb

npm i @deptno/dynamodb

log

if you want to check detail logs

DEBUG=@deptno/dynamodb node [your program]
import {createDynamoDB} from '@deptno/dynamodb'

const ddb = createDynamoDB(documnetClient)

ddb.scan<ReturnSchema>({
  TableName: '...',
  Limit: 300,
  ReturnConsumedCapacity: 'TOTAL'
})
{
  Items: [...],
  Count: 300,
  ScannedCount: 300,
  LastEvaluatedKey: {...},
  ConsumedCapacity: { TableName: '...', CapacityUnits: 22 }
} +19

api

  • raw DynamoDBClient
  • batchWrite write unlimited items
  • batchGet get unlimited items
  • scanAll recursive scan until end of items
  • scanAllSegmented same as scanAll but works with segmented
  • queryAll recursive query until end of items
  • util
    • js2ddbDoc normalize dynamodb document (eg. strip empty string property)
    • createToken tokenizer
    • parseToken token to json
    • gzip typed gzip json
    • unGzip typed unGzip json
    • createKey typed key and parser (eg. world#2019-11-01 -> {hello: string, createdAt: Date})

changelog

license

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @deptno/dynamodb

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

44.2 kB

Total Files

28

Last publish

Collaborators

  • deptno