that-simple-dynamo
TypeScript icon, indicating that this package has built-in type declarations

1.0.14 • Public • Published

That Simple Dynamo

CircleCI

Overview

A DynamoDB implementation of an IObjectStore

This allows the persistance if IModels into DynamoDB

See the following projects for more information:-

Example


    // Initialise the datastore
    let theObjectStore = new DynamoObjectStore({
        region: process.env.AWS_DEFAULT_REGION,
        accessKeyId: process.env.AWS_ACCESS_KEY_ID,
        secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
        endpoint: process.env.AWS_ENDPOINT
    })
    
    // Create a new item
    let item = new MyModel()
    item.id = '1234'
    theObjectStore.put(item)
    
    // Read an item	
    item = theObjectStore.get(MyModel, '1234')
    
    // Query all Items
    let items = theObjectStore.query()
	
    // Delete an Item
    theObjectStore.remove(item)
	

Readme

Keywords

none

Package Sidebar

Install

npm i that-simple-dynamo

Weekly Downloads

1

Version

1.0.14

License

MIT

Unpacked Size

83.5 kB

Total Files

64

Last publish

Collaborators

  • thatdevsteve