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

Fixed filter_condition examples in the docs #1204

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

Conversation

Ali-Toosi
Copy link

The current examples don't work with DynamoDB because they are using email in the range key condition.
It also doesn't seem like we can combine query terms for range conditions so I changed the wording to specify this is about filter conditions.

No code changes made.

@@ -136,11 +136,18 @@ Now, suppose that you want to search the table for users with a last name
for user in UserModel.query('Smith', UserModel.first_name.startswith('J')):
print(user.first_name)

You can combine query terms:
You can combine query terms in filter conditions using OR:
Copy link

Choose a reason for hiding this comment

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

I would clarify by saying

You can combine query terms in filter conditions using logical operators (ex, |, &, ==, etc.)

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the review.
I have given a separate example for & just below this one. Not sure how == would work here for combining queries 🤔
Let me know if there are other logical operators that are supported here. I'll either add them in-line or add a separate example if they make more sense that way.

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