Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.


::

for user in UserModel.query('Smith', UserModel.first_name.startswith('J') | UserModel.email.contains('domain.com')):
for user in UserModel.query('Smith', filter_condition=UserModel.email.contains('domain_a.com') | UserModel.email.contains('domain_b.com')):
print(user)

or using AND:

::

for user in UserModel.query('Smith', filter_condition=UserModel.email.startswith('smith') & UserModel.email.contains('domain.com')):
print(user)


Expand Down