Skip to content

Conversation

@bshaffer
Copy link
Contributor

@bshaffer bshaffer commented Jul 9, 2024

  • adds sample query_filter_compound_multi_ineq
  • Removes now invalid samples query_filter_range_invalid and query_order_field_invalid

@bshaffer bshaffer requested review from a team as code owners July 9, 2024 15:38
@snippet-bot
Copy link

snippet-bot bot commented Jul 9, 2024

Here is the summary of changes.

You are about to add 1 region tag.
You are about to delete 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jul 9, 2024
@bshaffer bshaffer force-pushed the add-firestore-multiple-ineq branch from 04afe4e to ff173a1 Compare July 10, 2024 14:26
@bshaffer bshaffer changed the title feat: add sample for multiple inequality filters feat(Firestore): add sample for multiple inequality filters Jul 18, 2024
Copy link
Contributor Author

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

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

typos!

@product-auto-label product-auto-label bot added the api: firestore Issues related to the Firestore API. label Jul 19, 2024
@clairekeer1997
Copy link

Hi Brent, this is Jia from Firestore queries team. Thanks for adding the examples for PHP! The example for Datastore looks good. But for FIrestore, this example query

        ->where('born', '>', 1900)
        ->where('born', '<', 1950);

only contains inequalities on a single field born. We need to have inequalities on different fields to be considered as a multiple inequalities query. For example, age > 20 AND height > 60 is a query with multiple inequalities.

@bshaffer bshaffer merged commit 847060f into main Jul 19, 2024
@bshaffer bshaffer deleted the add-firestore-multiple-ineq branch July 19, 2024 16:10
@bshaffer
Copy link
Contributor Author

bshaffer commented Jul 19, 2024

@clairekeer1997 hi Jia. If you click the "Files Changed", you can see the actual sample. What you're referring to is not part of this sample, which looks like this:

    $chainedQuery = $collection
        ->where('age', '>', 35)
        ->where('height', '>', 60)
        ->where('height', '<', 70);

@clairekeer1997
Copy link

Sorry I read on the wrong one. The updated example looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the Firestore API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants