0.3.3 • Published 6 years ago

dynamodb-schema v0.3.3

Weekly downloads
2
License
Apache License 2....
Repository
github
Last release
6 years ago

dynamodb-schema

Dynamodb plugin to improve schema creation and manipulation, we can use as you can.

Build Status GitHub issues GitHub forks GitHub release GitHub license

Social us:

Twitter

A Typescript Node.js package that create schemas on dynamoDb.

Installation

First, install the package using npm:

    npm install dynamo-schema --save

Getting Started

You will need to import the node module into your file:

    import dynamodbSchema from 'dynamodb-schema';

Usage

schema

    dynamodbSchema.schema([
        {
            name: 'tableName',
            attributtes: [
                { name: 'columnKey',  type: 'String' },
                { name: 'column2Key',  type: 'String' }
            ],
            keys: [
                { name: 'columnKey',  type: 'HASH' },
                { name: 'column2Key', type: 'RANGE' }
            ],
            throughput: {
                read: 1,
                write: 1
            }
        }
    ]);

createSchema

if you have been loaded informacion schema you only need to execute the following command to create schema.

    dynamodbSchema.createSchema();

dropSchema

if you have been loaded informacion schema you only need to execute the following command to drop schema.

    dynamodbSchema.dropSchema();

config

you can set config parameter into dynamodbSchema Object like the following example:

    dynamodbSchema.config({
        override?: Boolean,
        preffix?: String,
        subffix?: String,
        schema: Array<Schema>,
    });

override

override property could have been used it in order to set into dynamodb-schema object if you want to overried tables if exist or not.

preffix

you can use this property to assign schema preffix table, dynamodbSchema joins string before the table name into Schema object.

subffix

you can use this property to assign schema subffix table, dynamodbSchema joins string after the table name into Schema object.

schema

you can use this property to assign schema information to the dynamodbSchema object.

Data types schema support

TypeDynamo Type
StringS
BooleanS
NumberNumber
ArrayMap

Links

License

Apache 2.0

forthebadge forthebadge forthebadge

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.20

6 years ago

0.0.21

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago