Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding some more info for ScanIndexForward #691

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ahujamoh
Copy link

No description provided.

I added some more information to the scan_index_forward parameter from my experiments with sorting on the range key, and the documentation I felt missed this infromation.
@ahujamoh
Copy link
Author

Here is the documentation I referred to, and figured out it was a boolean.
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html#API_Query_RequestSyntax

@@ -574,8 +574,9 @@ def query(cls,
:param consistent_read: If True, a consistent read is performed
:param index_name: If set, then this index is used
:param limit: Used to limit the number of results returned
:param scan_index_forward: If set, then used to specify the same parameter to the DynamoDB API.
Controls descending or ascending results
:param scan_index_forward: (boolean) If set, then used to specify the same parameter to the DynamoDB API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:param scan_index_forward: (boolean) If set, then used to specify the same parameter to the DynamoDB API.
:param scan_index_forward: If set, then used to specify the same parameter to the DynamoDB API.

to be consistent with other documentation. We already have typing in the typeshed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe simply:

        :param scan_index_forward: If False, the sort order will be descending on the range key. The default sort order is ascending.

I don't think saying it's "the same parameter to the DynamoDB API" is very helpful, since it can be said about most of our features, since we're just wrapping DynamoDB and trying not remain relatively transparent.

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.

None yet

2 participants