castore icon indicating copy to clipboard operation
castore copied to clipboard

Allow DynamoDB index and key names to be overridden

Open g-farrow opened this issue 1 year ago â€ĸ 1 comments

Description đŸĻĢ

In some circumstances, it is necessary to use a DynamoDB table for multiple purposes. In those scenarios, it is often not possible to control the names of the Partition and Sort keys or the index names.

This includes when following "Single Table Design" method, whereby the DynamoDB table may be used for Event Sourcing (i.e. the target for castore) as well as other purposes.

Type of change 📝

Please delete options that are not relevant.

  • [x] New feature (non-breaking change which adds functionality)
  • [x] This change requires a documentation update

How Has This Been Tested? 🧑‍đŸ”Ŧ

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [x] Added [unit tests](L531 in singleTableAdapter.unit.test.ts)

Test Configuration: 🔧

N/A

Checklist: ✅

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas - I don't think this is required, but happy to add if required
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules - N/A

g-farrow avatar Dec 05 '23 14:12 g-farrow

Hi @ThomasAribart,

This is a great library, thank you for building it! I've already improved my understanding of event sourcing.

I raised this PR, but I wondered if you also wanted an issue to represent the feature request? let me know and I would be happy to create one, that this PR could then resolve.

g-farrow avatar Dec 12 '23 13:12 g-farrow