You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, first of all, ElectroDB is wonderful, thank you for creating this tool 🙏🏻!
I am trying to understand the use of gsis with electrodb:
Reusing a gsi for the same entity.
for example could I have
gsi1pk: ORG#ID
gsi1sk: TYPE#${type}#DATE
and then other records using the same gsi but with a different gsi1sk
gsi1pk: ORG#ID
gsi1sk: SOMETHING#${value}#DATE
which would allow me to retrieve items in a quite flexible way. When trying to attempt this I am ElectroDB throws an error:
Duplicate index defined in model found in Access Pattern 'entriesByOpen': 'gsi1pk-gsi1sk-index' - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#duplicate-indexes
What are the recommended patterns for achieving this or should I be thinking about this in a different way?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all, first of all, ElectroDB is wonderful, thank you for creating this tool 🙏🏻!
I am trying to understand the use of gsis with electrodb:
Reusing a gsi for the same entity.
for example could I have
and then other records using the same gsi but with a different
gsi1sk
which would allow me to retrieve items in a quite flexible way. When trying to attempt this I am ElectroDB throws an error:
What are the recommended patterns for achieving this or should I be thinking about this in a different way?
Beta Was this translation helpful? Give feedback.
All reactions