Skip to content

Conversation

@ikonst
Copy link
Contributor

@ikonst ikonst commented Aug 11, 2021

On top of the existing attributes_to_get, Scan.Select and Query.Select allows queries and scans against indexes with KEYS_ONLY and INCLUDE projections to read-through to the underlying table to fetch the entire model.

P.S. Effectively the interesting mode of operation here is just scan='ALL_ATTRIBUTES' for an index. Perhaps we shouldn't add it to Model.query/scan at all, while Index.query/scan should have ensure_all_attributes: bool which would trigger the behavior described here?

ALL_ATTRIBUTES - Returns all of the item attributes from the specified table or index. If you query a local secondary index, then for each matching item in the index, DynamoDB fetches the entire item from the parent table. If the index is configured to project all item attributes, then all of the data can be obtained from the local secondary index, and no fetching is required.

@ikonst ikonst changed the title Allow passing Select to Model/Index.query/scan Add Select parameter to Model/Index.query/scan Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants