Giter Site home page Giter Site logo

jasoncraftscode / dynamodb-datamodel Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 0.0 5.23 MB

DynamoDB single table design in javascript and typescript made easy.

Home Page: https://JasonCraftsCode.github.io/dynamodb-datamodel/

License: MIT License

TypeScript 99.42% JavaScript 0.58%
dynamodb aws aws-dynamodb aws-lambda serverless single-table-design

dynamodb-datamodel's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar jasonchr-msft avatar jasoncraftscode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dynamodb-datamodel's Issues

Multiple models?

Hi,
I was looking for a library to use DynamoDb as a single table design and this lib looks promising.
I could not find an example of how to use this with multiple models in a single table, except when having embedded models. Is there a way to use multiple Models in a Single Table? (The definition of the returned model should be left to the user who defines the access patterns)

Update.setIndexes should support undefined and null in values array

Is your feature request related to a problem? Please describe.
Update.setIndexes should support undefined and null in values array . To both skip undefined values and delete null values.

Describe the solution you'd like
See above

Describe alternatives you've considered
Update.delIndexes can be used, but supporting in setIndexes is more convenient with setting multiple indexes.

Additional context
None

Update.del should support having a path param to delete deep items.

Is your feature request related to a problem? Please describe.
Update.del doesn't take any args. To make it easy to delete an entry in a map attribute would be nice if del could support an optional path. Or maybe add a mapDel method so typescript can type check that it can only be used by a map or list attribute.

Describe the solution you'd like
see above

Describe alternatives you've considered
Update.map can be used to do deep deletion, but it isn't obvious or intuitive to use.

Additional context
none

Update.modelMap should support null models that map to delete

Is your feature request related to a problem? Please describe.
Update.modelMap currently requires the inner models to be none null, not allowing the delete operation at the map key level.

Describe the solution you'd like
Update.modelMap should support null which will delete the map key and its data from the item.

Describe alternatives you've considered
Update.delete can be used, but it means that add/update would be separate from delete. Also all properties support null to delete.

Additional context
none

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.