Skip to content

Conversation

schmidt-sebastian
Copy link
Contributor

This PR makes DocumentSnapshot.data() nullable and introduces a non-nullable QueryDocumentSnapshot type.

Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

LGTM with nits. Also please add a changelog entry.


@import FirebaseFirestore;

#import <FirebaseFirestore/FIRCollectionReference.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm surprised these are required. @import FirebaseFirestore; should have done this for you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed. App Code auto-adds them. I need to be more careful here :/

@end

/**
* A `FIRQueryDocumentSnapshot` contains data read from a document in your Firestore database. The
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps "contains data read from a document in your Firestore database as a part of a query."

Because these types are related we should add clarifying text here that describes when the two types are used, i.e. DocumentSnapshot for single document gets and listens, QueryDocumentSnapshot for query/collection gets/listens.

Copy link
Contributor Author

@schmidt-sebastian schmidt-sebastian Dec 12, 2017

Choose a reason for hiding this comment

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

Changed the comments. Let me know what you think since I need to port them to the other platforms.

@wilhuff wilhuff assigned schmidt-sebastian and unassigned wilhuff Dec 11, 2017
@schmidt-sebastian
Copy link
Contributor Author

Comments addressed. I left the Firestore.xcodeproj/project.pbxproj in this PR as this change shows up in all my diffs.

Is this an update we need to make? Otherwise, I will remove it.

@wilhuff
Copy link
Contributor

wilhuff commented Dec 12, 2017

Comments LGTM, please squash and merge.

Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

LGTM

@wilhuff wilhuff assigned schmidt-sebastian and unassigned wilhuff Dec 12, 2017
@schmidt-sebastian schmidt-sebastian merged commit 95b0761 into firestore-api-changes Dec 12, 2017
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt-nullable branch April 9, 2018 18:59
minafarid pushed a commit to minafarid/firebase-ios-sdk that referenced this pull request Jun 6, 2018
Making DocumentSnapshot.data() nullable
@firebase firebase locked and limited conversation to collaborators Nov 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants