dynamo-table-extensions

1.3.1 • Public • Published

dynamo-table-extensions

npm version Build Status

Adds higher-level methods to dynamo-table.

Extended API

throttledBatchWrite(capacityRatio, items, callback)

Batch writes items ensuring that at most a fraction of the table's write capacity corresponding to capacityRatio is used.

truncate(callback)

Truncates table

addNew(record, callback)

Adds new record to the table. If record[key] is defined then the method does put straight away. Otherwise it assigns new id and puts it to the table. Table key must be numeric. Assumes that this.nextId (from dynamo-table-id package) is available.

Thanks

Thanks to @mhart for dynamo-table upon which this extension is based.

Readme

Keywords

Package Sidebar

Install

npm i dynamo-table-extensions

Weekly Downloads

1,442

Version

1.3.1

License

MIT

Unpacked Size

29.9 kB

Total Files

11

Last publish

Collaborators

  • xarvh
  • alexandria