stradosphere stradosphere - 1 month ago 41
Javascript Question

How to query Firebase database with order by priority and shallow parameter

I have a query that I am using to get an array by priority, but I only want a shallow copy, not all the data underneath. Here is my query:

firebase.database().ref('nodeX').child(userId).orderByPriority()


Is there anyway to get the shallow parameter working in this format or do I need to craft a REST call?

I am using Firebase 3

Answer

The Firebase SDKs will always load complete nodes. They have no way to shallowly load the data.

The only way to get shallow data is through the Firebase REST API.

Comments