Barcha qiymatlarni Firebase ma'lumotlar bazasidan qanday olish mumkin

messages
                -K2ib4H77rj0LYewF7dP
                        text: "hello"
                        name: "anonymous"
                -K2ib5JHRbbL0NrztUfO
                        text: "how are you"
                        name: "anonymous"
                -K2ib62mjHh34CAUbide
                        text: "i am fine"
                        name: "anonymous"

Firebase bazasi: Men matn bolaning qiymatlarini olishga urinmoqdaman. Barcha qadriyatlarni qanday qilib olishim mumkin? va uni qatorda saqlash kerakmi?

2
Hazillashayapsanmi? Qaysi platforma? Qaysi til? O'qituvchini o'qishga harakat qildingizmi?
qo'shib qo'ydi muallif Dima Rostopira, manba

6 javoblar

Depends the platform, you can read the documentation for each platform here

1
qo'shib qo'ydi

Depends the platform, you can read the documentation for each platform here

1
qo'shib qo'ydi

Xo'sh, barcha xabarlar messages da saqlanadi, shuning uchun ... undan foydalaning!

0
qo'shib qo'ydi

Xo'sh, barcha xabarlar messages da saqlanadi, shuning uchun ... undan foydalaning!

0
qo'shib qo'ydi

Buni harakat qiling (agar siz Swift dan foydalanayotgan bo'lsangiz) -

let ref = FIRDatabase.database().reference()
ref.child("messages").observeSingleEvent(of: FIRDataEventType.value, with: { (snapshot) in
if let bracketsSnapshot = snapshot.children.allObjects as? [FIRDataSnapshot] { 
now you have your array, do something   })
0
qo'shib qo'ydi

Buni harakat qiling (agar siz Swift dan foydalanayotgan bo'lsangiz) -

let ref = FIRDatabase.database().reference()
ref.child("messages").observeSingleEvent(of: FIRDataEventType.value, with: { (snapshot) in
if let bracketsSnapshot = snapshot.children.allObjects as? [FIRDataSnapshot] { 
now you have your array, do something   })
0
qo'shib qo'ydi