-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Support for Query.getDocuments #376
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
Query.getDocuments|
I signed it! |
|
CLAs look good, thanks! |
61a123c to
d0024dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@briblanch Thanks for the PR could you have a look at the suggestions I made.
| @@ -1,3 +1,6 @@ | |||
| ## 0.2.7 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please bump this to match current version.
| case "Query#getDocuments": | ||
| { | ||
| Map<String, Object> arguments = call.arguments(); | ||
| CollectionReference collectionReference = getCollectionReference(arguments); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the entire collection will be retrieved, I think you wanted to use getQuery here.
| Future<QuerySnapshot> getDocuments() async { | ||
| final Map<String, dynamic> data = await Firestore.channel.invokeMethod( | ||
| 'Query#getDocuments', | ||
| <String, dynamic>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the _parameters to this Map, otherwise all of the collection is returned.
| <Matcher>[ | ||
| isMethodCall( | ||
| 'Query#getDocuments', | ||
| arguments: <String, dynamic>{'path': 'foo'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update test to check for expected parameters that would go along with the getDocuments call.
…store-get-documents # Conflicts: # packages/cloud_firestore/CHANGELOG.md # packages/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java
e75c379 to
d010bd9
Compare
|
@kroikie addressed your feedback. Thanks! |
Add support of retrieving the documents that match a query.
Description
Query.getDocuments()as shown in the api here.What was changed
Query.getDocuments()method.QuerySnapshotfrom the listener handlers to be shared withQuery.getDocumentsTesting