1.1.0 • Published 6 years ago

@quantilope/dynamoose-models v1.1.0

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

dynamoose-models

Example

Summary

To understand how to use these models, refer to the dynamoose docs.

import {
    createDeployedInfrastructureModel
} from '@quantilope/dynamoose-models';

// The function returns a Dynamoose model, so check out the dynamoose docs on
// how to use it.
const DeployedInfrastructure = createDeployedInfrastructureModel();

Create a new entry

const newInfrastructureEntry = new DeployedInfrastructure({
    id: process.env.INFRASTRUCTURE_ID,
    sshdHost,
    gottyHost
});

await newInfrastructureEntry.save();

Find an entry

// You get the object containing the document directly
const existingInfrastructure = await DeployedInfrastructure
    .queryOne('id').eq('myInfraId')
    .exec();

Find many entries

// You get an array of documents
const deployedInfrastructures = await DeployedInfrastructure
    .scan()
    .exec();

Publishing

We are using @pika/pack, so to build and release new version of this package:

# pack build
$ npm run build

# pack publish
$ npm run release
1.1.0

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

0.0.1

6 years ago