1.0.8 • Published 3 years ago

@novo-x/aws-dynamo v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

AWS DynamoDB Service

Available methods

  • getDocumentsByIndex: retrieves a list of documents by index
  • getDocumentById: retrieves a document by id
  • saveDocument: saves document
  • updateAwsConfig: updates the aws config

Usage examples

yarn add @novo-x/aws-dynamo

import {DynamoDB} from "@novo-x/aws-dynamo"

const MyService = new DynamoDB(/* optional config object */);

MyService.updateAwsConfig({
    // ... AWS config
})

const documentsByIndex = MyService.getDocumentsByIndex(
    'my_index', // indexName
    'my_key', // indexKey
    'index_value', // indexValue,
    'my_table' // tableName
);

const documentById = MyService.getDocumentById(
    'my_key', // keyName
    '123456789', // id
    'my_table' // tableName
)

const saved = MyService.saveDocument(
    {
        name: 'John Doe',
        age: 59
    }, // itemData,
    tableName // tableName
)

Dependencies

aws-sdk

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago