Skip to content
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

Update Database types #830

Merged
merged 3 commits into from
Apr 17, 2020
Merged

Update Database types #830

merged 3 commits into from
Apr 17, 2020

Conversation

schmidt-sebastian
Copy link
Contributor

@@ -1272,7 +1272,6 @@ export namespace admin.database {
* ```
*/
root: admin.database.Reference;
path: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we should make this change, but this doesn't exist in the Web types.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Reference.path is truly undefined let's remove it. Otherwise, let's call it deprecated for now and remove from a future major version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can make it deprecated. We removed in a major release on Web as well. FWIW, it is not actually a string but a util.Path object whose API is internal.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes no sense to remove this. Why require developers to individually create helper functions to fetch the string path from every reference instead of keeping this useful variable?

Every time I deploy my functions I'm greeted by a wall of "path is depreciated" messages... Why should I need to make a function called getPath(reference) that is prone to errors and needed to be referenced throughout my entire codebase when this does exactly what it needs to do?

Consider continuing support for this since the justification to depreciate it is so flimsy.

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a suggestion 👍

@@ -1272,7 +1272,6 @@ export namespace admin.database {
* ```
*/
root: admin.database.Reference;
path: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Reference.path is truly undefined let's remove it. Otherwise, let's call it deprecated for now and remove from a future major version.

@puf
Copy link

puf commented Aug 15, 2020

Not sure where else to post this, so putting it here: please indicate how devs are supposed to get the path without this property. See https://stackoverflow.com/q/63425252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

admin.database.Query.on callback wrong params
4 participants