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
206 stars 27 forks source link

Are there ways to query against GSI or LSI? #303

Closed nottakis closed 4 years ago

nottakis commented 4 years ago

Hi. Thank you for creating this project. It's helpful because we don't have to care about typing anymore:)

By the way, how can we query using GSI? I looked for the documentation, but I couldn't figure out how we can do it.

Just giving me a reference or a tiny example is helpful to me.

nottakis commented 4 years ago

I think I get it:)

like this

store
  .query()
  .index("GSIIndexName")
  .wherePartitionKey(partitionKey)
  .ascending()
  .exec()

Thanks!