Socket
Socket
Sign inDemoInstall

@useful/dynamodb

Package Overview
Dependencies
2
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @useful/dynamodb

Standardized patterns for working with DynamoDB


Version published
Maintainers
3
Install size
86.6 MB
Created

Readme

Source

Put an Item to DynamoDB

const put = require('@useful/dynamodb').put;

put('my-ddb-table', objectIWantStored); // returns a promise

Get an Item from DynamoDB

const get = require('@useful/dynamodb').get;

get('my-ddb-table', { YourHashKeyName: "YourItemsHashKeyValue" }); // returns a promise

Delete an Item from DynamoDB

const remove = require('@useful/dynamodb').remove;

remove('my-ddb-table', { YourHashKeyName: "YourItemsHashKeyValue" }); // returns a promise

Update an Item in DynamoDB

const update = require('@useful/dynamodb').update;

update('my-ddb-table', { YourHashKeyName: "YourItemsHashKeyValue" }, { /* Your update expression */ }, { /* Your expression attribute values */ }, /* ReturnValues string */ ); // returns a promise

Query a DynamoDB

const query = require('@useful/dynamodb').query;

var params = {
    TableName : "Movies",
    KeyConditionExpression: "#yr = :yyyy",
    ExpressionAttributeNames:{
        "#yr": "year"
    },
    ExpressionAttributeValues: {
        ":yyyy":1985
    }
};

query(params); // returns a promise

FAQs

Last updated on 18 Nov 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc