🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@useful/dynamodb

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@useful/dynamodb

Standardized patterns for working with DynamoDB

1.0.8
latest
Source
npm
Version published
Maintainers
3
Created
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

Package last updated on 18 Nov 2016

Did you know?

Socket

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