dynamo-ts icon indicating copy to clipboard operation
dynamo-ts copied to clipboard

Single Table questions

Open TheDanBlanco opened this issue 1 year ago • 1 comments

hey folks! i've been using this library for a while and i think you've created something great here. that said, i find a few limitations that might just be from my own misuse of the library. i've tried to jump into some of the code, but the types are fairly complex!

relating data using indexes

part of single table design (std) is using indexes as secondary access patterns for relations, but i haven't found a way to do this outside of constructing my own pks & sks. is there a built-in way to handle this?

example: (please ignore sample delimiters) pk: org#walmart sk: store-id#uuid-etc-etc-etc gsi1pk: type#store gsi1sk: zone#AMER#status#open

compound keys

in the second gsi in my previous example, i want to be able to define a heirarchy using multiple parts of an object. is there a way to implement this?

TheDanBlanco avatar Sep 04 '24 19:09 TheDanBlanco

Hey thanks for your support! There is currently no way to do this out of the box and you would have to manually as you have done. We want to support this feature and will happily add it as soon as possible. If you feel like attempting the solution we will gladly accept a PR.

chrisbarbour avatar Sep 10 '24 13:09 chrisbarbour