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

fix(firestore): update query samples to use FieldFilter #10407

Merged
merged 3 commits into from
Jul 12, 2023

Conversation

kolea2
Copy link
Contributor

@kolea2 kolea2 commented Jul 11, 2023

Description

Update the samples which currently show the following warnings:

UserWarning: Detected filter using positional arguments. Prefer using the 'filter' keyword argument instead.
    cities_ref.where("state", ">=", "CA").where("state", "<=", "IN")

Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

@kolea2 kolea2 requested review from a team as code owners July 11, 2023 16:35
@product-auto-label product-auto-label bot added api: firestore Issues related to the Firestore API. samples Issues that are directly related to samples. labels Jul 11, 2023
@kolea2 kolea2 added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 11, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 11, 2023
@kolea2 kolea2 changed the title firestore: update query samples to use FieldFilter fix(firestore): update query samples to use FieldFilter Jul 11, 2023
@rsamborski rsamborski merged commit 5d2e0bb into GoogleCloudPlatform:main Jul 12, 2023
10 checks passed
@kolea2 kolea2 deleted the filter-update branch July 12, 2023 14:32
danghai added a commit to kernelci/kcidb that referenced this pull request Dec 3, 2023
Fix: #431
UserWarning in build log: Detected filter using positional arguments.
Prefer using the 'filter' keyword argument instead
The filter argument takes BaseFilter class which is an abstract class
and it is implemented in FieldFilter. This class can be imported from
google.cloud.firestore_v1.base_query
Reference: googleapis/python-firestore#705
	   GoogleCloudPlatform/python-docs-samples#10407
spbnick pushed a commit to kernelci/kcidb that referenced this pull request Dec 5, 2023
Fix: #431
UserWarning in build log: Detected filter using positional arguments.
Prefer using the 'filter' keyword argument instead
The filter argument takes BaseFilter class which is an abstract class
and it is implemented in FieldFilter. This class can be imported from
google.cloud.firestore_v1.base_query
Reference: googleapis/python-firestore#705
	   GoogleCloudPlatform/python-docs-samples#10407
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.

None yet

4 participants