Stradosphere
Stradosphere

Reputation: 1285

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

Upvotes: 0

Views: 538

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598817

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.

Upvotes: 1

Related Questions