- Add asynchronous versions of existing methods that support callbacks
- Support passing a
costLogger
which will be called with castedConsumedCapacity
- Support reusing DynamoDB Client by passing
dynoInstance
- update reduceCapacity to support new data shape #157
- updates minimist dependency to v1.2.6 from v1.2.5
- drop support for Node 6 & 8
- add support for node 12
- update critical severity dependencies including eslint, underscore, nyc, documentation, coveralls, minimist
- remove .travis.yml tests and cloudformation template, run tests with codebuild
- update @mapbox/dynamodb-test to use the latest dynalite and leveldown packages
- replace
Buffer()
withBuffer.from()
- automatically remove
TableId
before createTable to support round-tripping requests fromexport -> import
- pin event-stream to
3.3.4
- use @mapbox/dynamodbtest
- updates aws-sdk dependency to
2.x
to help reduce the weight of the aws-sdk in your bundle
- updates aws-sdk dependency to v2.7+ from v2.1+
- fixes a bug where certain errors were not handled correctly by
.batchWriteAll()
- adds
.batchGetAll()
and.batchWriteAll()
methods - adds autopagination to
.query()
and.scan()
methods via aPages
parameter. - fixes a bug in the cli which prevented export --> import roundtrips
- adds
dyno.putStream()
, a writable stream to batch individual records intoBatchWriteItem
requests - bug fixes in cli
- fixes a bug in converting JavaScript arrays to DynamoDB Sets if the first item in the array is falsy (e.g
0
)
The overarching goal is to prefer to utilize the aws-sdk commands where possible, inheriting their bug fixes, updates, and documentation. Some aspects of dyno's API are really nice (e.g. .getItem(key)
instead of .getItem({ Key: key })
), but having documentation that we don't have to maintain is arguably better.
... the big changes are:
- "dyno-style" function arguments, conditions, and options go away. Instead all function arguments are as described for the aws-sdk's document client.
- dyno navigates the differences between the aws-sdk's regular client and document client for you behind the scenes.
- with the exception of explicit
stream
functions, none of the function calls fan out into multiple HTTP requests. It doesn't handle pagination, it doesn't split large batch requests into a series of acceptably-sized requests, and it doesn't attempt to retry errors. Configuring when and how errors are retried becomes the client's responsibility using aws-sdk's mechanisms.
- client configuration requires you to provide a
table
name - dyno.getItems renamed to dyno.batchGetItem, as a passthrough to aws-sdk.
- no longer accepts an array of keys and optional
options
object. See aws-sdk docs for parameters - does not allow you to request more than 100 items per function call
- does not provide a readable stream of response records
- no longer accepts an array of keys and optional
- dyno.deleteItems and dyno.putItems replaced by dyno.batchWriteItem, a passthrough to aws-sdk.
- no longer accepts an array of items to put / keys to delete and optional
options
object. See aws-sdk docs for parameters - does not allow you to write > 25 items or 16 MB per function call
- no longer accepts an array of items to put / keys to delete and optional
- dyno.deleteItem becomes a passthrough to aws-sdk. No longer accepts a key and optional
options
object. See aws-sdk docs for parameters - dyno.getItem becomes a passthrough to aws-sdk. No longer accepts a key and optional
options
object. See aws-sdk docs for parameters - dyno.putItem becomes a passthrough to aws-sdk. No longer accepts a record and optional
options
object. See aws-sdk docs for parameters - dyno.updateItem becomes a passthrough to aws-sdk. No longer accepts a key, "dyno-style" update definition and optional
options
object. See aws-sdk docs for parameters - dyno.query becomes a passthrough to aws-sdk.
- no longer accepts the "dyno-style" query conditions and optional
options
object. See aws-sdk docs for parameters - does not paginate through the reponse for you. Pagination can be accomplished manually or via aws-sdk's functions.
- does not provide a readable stream of response records
- no longer accepts the "dyno-style" query conditions and optional
- dyno.scan becomes a passthrough to aws-sdk.
- no longer accepts an optional
options
object. [aws-sdk docs for parameters](See http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#scan-property) - does not paginate through the response for you. Pagination can be accomplished manually or via aws-sdk's functions
- does not provide a readable stream of response records
- no longer accepts an optional
- drops dyno.estimateSize
- drops all kinesis-related functionality
- dyno.queryStream provides a readable stream of query responses. Parameters passed to the function are identical to dyno.query, but the function returns a readable stream that will paginate through results as you read from it.
- dyno.scanStream provides a readable stream of scan responses. Parameters passed to the function are identical to dyno.scan, but the function returns a readable stream that will paginate through results as you read from it.
- dyno.batchWriteItemRequests provides an array of AWS.Request objects representing BatchWriteItem requests. Parameters passed to the function are identical to dyno.batchWriteItem, except that there is no size/count limit to the number or write requests you may provide.
- dyno.batchGetItemRequests provides an array of AWS.Request objects representing BatchGetItem requests. Parameters passed to the function are identical to dyno.batchGetItem, except that there is no size/count limit to the number or get requests you may provide.
- Return native format (not wire format) for
metas[*].last
(LastEvaluatedKey
). - Callers must use native format (not wire format) when passing in
opts.start
(ExclusiveStartKey
).
- Fixed a bug that did not allow the CLI tool to function using EC2 IAM Role-based credentials
- Adds a function to estimate the number of bytes required to store an item
- Allows caller to set concurrency on batch requests
- Batch write requests now return any keys that went unprocessed
- Add support for document types (List and Map), Boolean, and Null
- Native JavaScript arrays will now transform into lists instead of sets
- Add
Dyno.createSet()
, which constructs sets (of number, string, or binary type) that transform to the DynamoDB wire format correctly. - Drop support for using a wire-formatted object as input.
- Add
Dyno.serialize()
andDyno.deserialize()
to convert items to/from strings