firebase-realtime-database

Joins in the Firebase Database

安稳与你 提交于 2021-02-04 06:30:07
问题 The firebase data structure is { "eventAttendees" : { "fm" : { "1" : "David", "2" : "Alice" } }, "events" : { "fm" : { "date" : "2017-06-16", "name" : "Firebase Meetup" }, "gm" : { "date" : "2017-08-12", "name" : "Meet Linh" } }, "users" : { "1" : { "email" : "david@gmail.com", "name" : "David" }, "2" : { "email" : "alice@gmail.com", "name" : "Alice" }, "10" : { "email" : "khanh@gmail.com", "name" : "Khanh" } } } I want to find all users who go to fm event. Here is my code: let ref = Database

Ordering data does not actually order anything

浪尽此生 提交于 2021-02-02 09:14:12
问题 I'm trying to get a dataset of messages out of my firebase database and want the messages sorted by added/timestamp. But for some reason no orderby I put in the code is actually used. I tried doing these 2 things. _messagesRef = FirebaseDatabase.instance.reference().child('messages/'+key); _membersSubscription = _messagesRef .orderByChild('timestamp') .onValue//On valuechange .listen((Event event) => _messagesSubscriptionCallback(event)); _messagesRef = FirebaseDatabase.instance.reference()

Ordering data does not actually order anything

久未见 提交于 2021-02-02 09:13:21
问题 I'm trying to get a dataset of messages out of my firebase database and want the messages sorted by added/timestamp. But for some reason no orderby I put in the code is actually used. I tried doing these 2 things. _messagesRef = FirebaseDatabase.instance.reference().child('messages/'+key); _membersSubscription = _messagesRef .orderByChild('timestamp') .onValue//On valuechange .listen((Event event) => _messagesSubscriptionCallback(event)); _messagesRef = FirebaseDatabase.instance.reference()

Ordering data does not actually order anything

大兔子大兔子 提交于 2021-02-02 09:12:41
问题 I'm trying to get a dataset of messages out of my firebase database and want the messages sorted by added/timestamp. But for some reason no orderby I put in the code is actually used. I tried doing these 2 things. _messagesRef = FirebaseDatabase.instance.reference().child('messages/'+key); _membersSubscription = _messagesRef .orderByChild('timestamp') .onValue//On valuechange .listen((Event event) => _messagesSubscriptionCallback(event)); _messagesRef = FirebaseDatabase.instance.reference()

App updates data in firebase real-time database but doesn't show anything in recyclerview

社会主义新天地 提交于 2021-02-01 05:14:38
问题 I am trying to add data onto firbase realtime database and retrieve that data on a recyclerview.I am successfully able to do that but when i try to retrieve data from firebase its not happening even-though when i try to print my data on logacat window i am successfully able to do that. MainActivity.java import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import

App updates data in firebase real-time database but doesn't show anything in recyclerview

孤者浪人 提交于 2021-02-01 05:14:28
问题 I am trying to add data onto firbase realtime database and retrieve that data on a recyclerview.I am successfully able to do that but when i try to retrieve data from firebase its not happening even-though when i try to print my data on logacat window i am successfully able to do that. MainActivity.java import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import

App updates data in firebase real-time database but doesn't show anything in recyclerview

时光毁灭记忆、已成空白 提交于 2021-02-01 05:14:17
问题 I am trying to add data onto firbase realtime database and retrieve that data on a recyclerview.I am successfully able to do that but when i try to retrieve data from firebase its not happening even-though when i try to print my data on logacat window i am successfully able to do that. MainActivity.java import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import

Firebase Realtime Javascript SDK : orderByChild and equalTo not working with string like “+123”

穿精又带淫゛_ 提交于 2021-01-29 22:57:12
问题 Using the Javascript SDK and this sample firebase database, with an index on "mobile" : test A mobile : "+1234567" B mobile : "+2345678" Now I want to query all nodes with mobile = "+1234567" firebase.database().ref("test").orderByChild("mobile").equalTo("+1234567").once('value', function(snapshot) { console.log(snapshot.val()); }); output : null I asked this exact same question for REST API (resolved) : Firebase Realtime equalTo not working with String like "+123" But can not get it working

Firebase Realtime Javascript SDK : orderByChild and equalTo not working with string like “+123”

白昼怎懂夜的黑 提交于 2021-01-29 22:56:21
问题 Using the Javascript SDK and this sample firebase database, with an index on "mobile" : test A mobile : "+1234567" B mobile : "+2345678" Now I want to query all nodes with mobile = "+1234567" firebase.database().ref("test").orderByChild("mobile").equalTo("+1234567").once('value', function(snapshot) { console.log(snapshot.val()); }); output : null I asked this exact same question for REST API (resolved) : Firebase Realtime equalTo not working with String like "+123" But can not get it working

Firebase Realtime Javascript SDK : orderByChild and equalTo not working with string like “+123”

爱⌒轻易说出口 提交于 2021-01-29 22:55:41
问题 Using the Javascript SDK and this sample firebase database, with an index on "mobile" : test A mobile : "+1234567" B mobile : "+2345678" Now I want to query all nodes with mobile = "+1234567" firebase.database().ref("test").orderByChild("mobile").equalTo("+1234567").once('value', function(snapshot) { console.log(snapshot.val()); }); output : null I asked this exact same question for REST API (resolved) : Firebase Realtime equalTo not working with String like "+123" But can not get it working