dynadash
TypeScript icon, indicating that this package has built-in type declarations

1.9.22 • Public • Published

dynadash

Helpers

  • getTableRow - get single row
getTableRow(
    tableName, // string
    keys, // { hash: "key", range: "key" },
    projection?, // string[], (optional)
    consistent? // boolean, (optional)
)
  • queryTableIndex - query table index
queryTableIndex(
    tableName, // string
    indexName, // string

    // Simplified mappings to generate `KeyConditionExpression` and `FilterExpression`.
    // key/val pair generates a simple equality condition, use an object to specify operator and value if needed.
    keyCondExpressionMap, // { hash: 'test', range: { op: '>=', value: 1234 }}
    filterExpressionMap // same as ^, with addition of "<>" operator
)
  • batchPutTable, batchDelTable - generate bulk write requests, chunks of 25 each, auto retry (10x max) w/ exponential backoff. (2s - 4min)
batchPutTable(
    tableName, // string
    unmarshalledList, // any[],
    predicate?, // (item) => any  // called for every element of `unmarshalledList` (optional)
)
  • putTableRow, delTableRow - update or delete single item
putTableRow(tableName, item)
delTableRow(tableName, key)
  • shallowUpdateTableRow - shallow update 1st level elements
shallowUpdateTableRow(
    tableName, // string
    keys, // { hash: "key", range: "key" }
    row, // { attr: "newValue", attr2: "newVal" }
)

Readme

Keywords

Package Sidebar

Install

npm i dynadash

Weekly Downloads

0

Version

1.9.22

License

MIT

Unpacked Size

69.1 kB

Total Files

36

Last publish

Collaborators

  • frankleng