Expose databaseId and projectId on Firestore class #1936
Labels
api: firestore
Issues related to the googleapis/nodejs-firestore API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Given the introducing of multiple databases it becomes more and more often that you want to know from where a Reference or snapshot was created for.
Right now there is no way to go from a
DocumentReference
or aDocumentSnapshot
to the database or the project.It should simply be possible to do the following:
Those getters already exist but they are marked a private/internal making accessing them in Typescript unavailable.
Right now you need to do some fishy stuff accessing internal variables, silencing Typescript errors (using
as any
) or other unofficial, undocumented things.Given those things are not officially supported and APIs may change without proper breaking changes this makes depending on those workarounds, not a solution.
The text was updated successfully, but these errors were encountered: