@nutshelllab/dynamo-wrapper

A basic wrapper to use dynamoDb in Nutshell serverless apps.

Usage no npm install needed!

<script type="module">
  import nutshelllabDynamoWrapper from 'https://cdn.skypack.dev/@nutshelllab/dynamo-wrapper';
</script>

README

Dynamo Connector

All in here is used to fetch data from dynamo a dynamo table.

Docs

add({ args, params = null, options })

Extend : DynamoDB - put

new Table().add({
  args: {
    string: "String",
    object: {"Object"},
    array: ["Array"],
    numeric: "Numeric"
  },
  params: {
    DynamodbParams
  },
  options: {
    customPrimaryKey: "Boolean"
  }
})

query(params = null)

Extend : DynamoDB - query

new Table().query({
  DynamodbParams
})

find(params = null)

Extend : DynamoDB - scan

new Table().find({
  DynamodbParams
})

findById(key, params = null)

Extend : DynamoDB - get

new Table().findById({
  primaryKey: "String",
  sortingKey: "String"
},
{
  DynamodbParams
})