A DDD ORM make with dynamodb mapper js
- cli with commands:
deploy, executeupscript from migration filesrollback, executedownscript from migration filesadd, create a new migration file
- Migration class, extending Connection class with:
createTabledropTable
- a
updatedAtfield that updated itself after every change, and a way for disabiliting it - commom fields,
updatedAtandupdatedAt - Model with a new method:
- sync update => this
- Base methods of
Modelbeing able to being overhide on definiton of model, in this case the original method is writen as_methodName
- There is a base
Modelfor the rootclass/entity, and a constructor for each item of a List on the Model. - The base
Modelbrings the following commom methods:- sync set => this
- sync get => Map
- sync addItem => this
- sync updateItem => this
- sync removeItem => this
- async validate => void
- async save => Promise(this)
- async delete => Promise(this)
- The
Repositoryinstance come withfind(),get()andquery()out of box, it uses theconnectionbehind to return a instance of the base Model, with the above methods. - The connection is a wrapper around the
dynamodb-data-mapper-js, it has inside the mapper it-self and the dynamodb Client instance. - There is a powerfull way of extend any module of the above components.
- Simple aggregation root with no list inside.
- Simple aggregation root with a list inside.
- Schema validation to
JSONSchema - Schema on migration
- Migration of schemas:
- data.v1 to data.v2
- data.v2 to data.v2
- publish this version on npm
- a full documentation of operations
- a example of extensability, adding custom methods
- coments in the code
- application of the
versionAttributeofmapper - a commom fields, with a way for configuring it
- Dynamodb-data-mapper-js
- Joi
- aws-sdk