-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
firestore: allow StartAt/EndBefore on direct children at any depth
In firestore, it is legal to construct a query with a StartAt or EndBefore filter. These accept document snapshots (snaps) as input parameters. If a snap is passed, that snap must be a direct child of the location being queried. However, the current implementation has a bug that only allows children of documents at depth=1 to be specified: an extra /documents/ gets added to the collectionPath of each collection: e.g. querying /c1/d1/c2 with StartAt at /c1/d1/c2/d2 resulted in an incorrect path /database/some-db/c1/d1/c2/documents/d2. It should be /database/some-db/documents/c1/d1/c2/d2. So, despite being a valid StartAt value, the user experiences an error. This CL fixes that issue. Finally, some documentation was updated to make all this behavior more clear. Fixes #1225 Change-Id: I7f467701d5ccf4b5a77bb3c4b1960e6ef173dfb3 Reviewed-on: https://code-review.googlesource.com/c/35790 Reviewed-by: Eno Compton <enocom@google.com>
- Loading branch information
Showing
8 changed files
with
248 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.