-
Notifications
You must be signed in to change notification settings - Fork 948
New Query API #3390
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
New Query API #3390
Conversation
💥 No ChangesetLatest commit: 0de9472 Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂 If these changes should be published to npm, you need to add a changeset. This PR includes no changesetsWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Click here to learn what changesets are, and how to add one. Click here if you're a maintainer who wants to add a changeset to this PR |
Binary Size ReportAffected SDKs
Test Logs
|
fe4fdea
to
f9e8aa2
Compare
17b6d3d
to
7e81537
Compare
bde4f39
to
7958de9
Compare
a7a4190
to
77d3d06
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.
LGTM
packages/firestore/exp/test/shim.ts
Outdated
@@ -54,7 +55,15 @@ import { | |||
terminate, | |||
updateDoc, | |||
waitForPendingWrites, | |||
writeBatch | |||
writeBatch, | |||
limit, |
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.
Should these imports be ordered alphabetically?
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.
I am going to defer this to the day when we have a lint rule for this. We have tried to keep imports sorted, but it is hard to maintain without tooling. I have since given up on this completely and life has been fabulous :)
packages/firestore/exp/test/shim.ts
Outdated
@@ -265,7 +274,9 @@ export class DocumentReference<T = legacy.DocumentData> | |||
readonly path = this._delegate.path; | |||
|
|||
get parent(): legacy.CollectionReference<T> { | |||
return new CollectionReference<T>(parent(this._delegate)); | |||
// TODO(firestoreexp): This bang should be removed one CollectionReference |
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.
"bang"? Is this TODO obsolete and can be removed?
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.
Removed (last week, but well after the PR was opened).
See also here for explanation: https://stackoverflow.com/questions/42273853/in-typescript-what-is-the-exclamation-mark-bang-operator-when-dereferenci
@@ -42,7 +43,16 @@ export { | |||
updateDoc, | |||
addDoc, | |||
refEqual, | |||
queryEqual | |||
queryEqual, |
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.
Also here... are imports typically sorted alphabetically?
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.
Same as above. Summary: Yes, but no :)
packages/firestore/lite/test/shim.ts
Outdated
@@ -246,7 +255,9 @@ export class DocumentReference<T = legacy.DocumentData> | |||
readonly path = this._delegate.path; | |||
|
|||
get parent(): legacy.CollectionReference<T> { | |||
return new CollectionReference<T>(parent(this._delegate)); | |||
// TODO(firestorelite): This bang should be removed one CollectionReference |
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.
Is this comment about a "bang" still relevant? I'm not sure what it means in this context.
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.
As of #3402, TypeScript can now tell our DocumentReferences/CollectionReferences apart. Bang has been removed. It was needed to take the nullability away from one the invalid parent
overloads.
This is the new Query API proposed in go/firestore-next-amendment
Couple notes:
memoizedOrderBy
and related fields as a public field.