0.1.1 • Published 5 years ago
@deptno/dynamodb v0.1.1
@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
DynamoDBClientbatchWrite
write unlimited itemsbatchGet
get unlimited itemsscanAll
recursive scan until end of itemsscanAllSegmented
same as scanAll but works with segmentedqueryAll
recursive query until end of itemsutil
js2ddbDoc
normalize dynamodb document (eg. strip empty string property)createToken
tokenizerparseToken
token to jsongzip
typed gzip jsonunGzip
typed unGzip jsoncreateKey
typed key and parser (eg.world#2019-11-01
->{hello: string, createdAt: Date}
)
changelog
license
MIT