@nutshelllab/dynamodb-table
v0.0.12
Published
Just sugar syntax over AWS DynamoDB
Downloads
6
Readme
dynamodb-table
Just sugar syntax over AWS DynamoDB
:warning: 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