firebase / firebase/firebase-js-sdk
Provide a consistent way of accessing the Firestore query on firestore.Query
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 37
Description
### [REQUIRED] Describe your environment
* Operating System version: MacOS Catalina 10.15.1
* Browser version: Chrome, Firefox, Safari, Edge
* Firebase SDK version: 7.14.2
* Firebase Product: Firestore
### [REQUIRED] Describe the problem
We need access to the string representation of the database query stored in `firebase.firestore.Query`. We're using it to create a key for caching queries.
```typescript
function getCacheKey(query: firebase.firestore.Query) {
return query.wp.toString(); // returns something like Query(....
}
```
The problem is that this variable `wp` has been obfuscated by the build process. If you change the version of the Firebase SDK, this variable name will change.
Can you provide a consistent way of accessing this property? Either through a method or through a instance variable that won't be obfuscated.
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.