-
Notifications
You must be signed in to change notification settings - Fork 943
Update invokeRun*QueryRpc functions to support paths with special characters #7402
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
Changes from all commits
1d76d33
2a8559e
77fac22
b112a15
7128eec
48c09d5
a1707ea
aa7346a
cc839f4
fbe27c3
d0f2e87
ca6a28c
608ff83
a6c3460
1ce5e4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@firebase/firestore": patch | ||
--- | ||
|
||
Support special characters in query paths sent to `getCountFromServer(...)`, `getCount(...)` (lite API), and `getDocs(...)` (lite API). | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,6 +215,15 @@ export class ResourcePath extends BasePath<ResourcePath> { | |
return this.canonicalString(); | ||
} | ||
|
||
/** | ||
* Returns a string representation of this path | ||
* where each path segment has been encoded with | ||
* `encodeURIComponent`. | ||
*/ | ||
toUriEncodedString(): string { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I considered that, but I felt more strongly that the structure of the path and how to URI encode the path should be the responsibility of the Path class. IMO, the connection shouldn't be responsible for knowing how to break up a path and encode its parts. |
||
return this.toArray().map(encodeURIComponent).join('/'); | ||
} | ||
|
||
/** | ||
* Creates a resource path from the given slash-delimited string. If multiple | ||
* arguments are provided, all components are combined. Leading and trailing | ||
|
Uh oh!
There was an error while loading. Please reload this page.