dynamodb-rest

0.0.7 • Public • Published

DynamoDB-RESTful client CircleCI

An opinionated client for AWS DynamoDB based on AWS DynamoDb with Axios

This library is for generating composite key-based queries. See AWS re:Invent 2018: Amazon DynamoDB Deep Dive: Advanced Design Patterns for DynamoDB (DAT401) for a primer on this approach to NoSQL database design.

Usage

For now see test suite for usage

API

Queries

Provided query builders emit queries that can be executed by the operation helpers. You can create your own query builders and/or higher order builders by manipulating existing builder results.

get()
post()
patch()
delete()
put()
query()
count()

Client

Configure

dynamodb(obj)

Operations

In addition to the actions-based API provided by DynamoDb with Axios helpers are added for invoking queries generated with the provided query helpers.

invoke(obj|arr)
batchGet(arr)
batchWrite(arr)
transactGet(obj|arr)
transactWrite(obj|arr)

Interceptors

Axios inspired interceptors are provided for injecting and extracting behavior from requests and responses.

dynamodb.interceptors.request.use(fn) => (query)
dynamodb.interceptors.response.use(fn) => (response, query))

/dynamodb-rest/

    Package Sidebar

    Install

    npm i dynamodb-rest

    Weekly Downloads

    2

    Version

    0.0.7

    License

    MIT

    Unpacked Size

    226 kB

    Total Files

    21

    Last publish

    Collaborators

    • possibilities