0

I have two firebase realtime db queries.

Query 1 : firebase.database().ref("Messages/" + suid).child(ids + "/chat").orderByKey().limitToLast(1); Query 2 : firebase.database().ref(`Messages/${suid}/${ids}/chat`).orderByKey().limitToLast(1); 

Both queries are working fine, what is difference between query 1 and query 2. Is Query 2 technically correct/reliable or efficient from Query 1. Will it save my download bandwidth?

1 Answer 1

1

There is no difference, in any case you have a DatabaseReference instance.

A Firebase reference represents a particular location in your Database and can be used for reading or writing data to that Database location.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.