firebase snapshot: return specific fields only

2,139 views
Skip to first unread message

Douwe van Dijk

unread,
Mar 14, 2016, 6:06:31 AM3/14/16
to Firebase Google Group
Hi All,

I am not sure if this is already implemened or added as a feature request for the WEB api, but is there a way to only return specific childs in the snapshot (e.g. what the _.without function does in underscore ). In some cases I need to access a root element but do not need to whole object to be returned. 

Regards, D.

Michael Bleigh

unread,
Mar 14, 2016, 1:52:41 PM3/14/16
to Firebase Google Group
Hi Douwe,

The Firebase database is architected in such a way that you will always fetch the entire child tree of a given location when fetching any data from that location. We try to build our APIs so that things that are expensive for the database feel expensive in the API, and this is one of them.

I'd recommend reading over best practices for structuring data and pinging this group with any specific data structure questions you come across when building your app.

Cheers!
Michael

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/93e23a74-cb34-43d3-8489-f2f7f35a7f6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages