shiftcode / dynamo-easy

DynamoDB client for NodeJS and browser with a fluent api to build requests. We take care of the type mapping between JS and DynamoDB, customizable trough typescript decorators.
https://shiftcode.github.io/dynamo-easy/
MIT License
204 stars 27 forks source link

Single Table Design Multi Model Store #333

Open hookercookerman opened 3 years ago

hookercookerman commented 3 years ago

Is your feature request related to a problem? Please describe.

Single Table Design is the new hotness, at present the stores are limited to one type. I propose a Multi Model Store, where a key default type key is used for looking up the mappings to apply to that item. This type key (lookup) can be configured as a global config or at the multimodel level for robustness.

The Db Item is not instantiated via its class (which I feel is a good thing) but mappings are applied.

the type key is configurable as a global or at a 'store level`

Describe the solution you'd like

I am happy to tackle this is pointed in the right directions