Skip to content

nutshell-lab/dynamodb-table

Repository files navigation

dynamodb-table

Build Status npm bundle size Maintainability

Just sugar syntax over AWS DynamoDB

⚠️ Work in progress, not published yet.

Install

yarn add @nutshelllab/dynamodb-table

Usage

Single primary key

import Table from '@nutshelllab/dynamodb-table'

const usersStore = new Table('users')

(async ({ id, ...data }) => {
  const users = await usersStore.put({
    key: { id },
    data
  })
})

Combined primary key

import Table from '@nutshelllab/dynamodb-table'

const postsStore = new Table('users_posts')

(async ({ userId, id, ...data }) => {
  const users = await usersStore.put({
    key: { userId, id },
    data
  })
})

API

method(arg1, arg2)

arg1

Type: string

Arg1 description

arg2

Type: Object

Arg2 description

License

MIT © Nutshell

About

Just sugar syntax over AWS DynamoDB module

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •