Saving Data on Android



Download 19,28 Mb.
Pdf ko'rish
bet276/292
Sana24.01.2022
Hajmi19,28 Mb.
#407089
1   ...   272   273   274   275   276   277   278   279   ...   292
Bog'liq
Bailey J., Dominguez A., Djermanovic D. - Saving Data on Android (1st Edition) - 2019

Ordering and limi/ng
You've already seen how you can specify which documents you want to fetch from 
the collection by using 
whereEqualTo()
. But there's much more you can do, on top 
of the 
whereEqualTo()
:
• You can use 
orderBy()
 on the collection reference to sort the data by the specified 
field. By default, the documents are sorted in ascending order by document ID.
• You can use 
limit()
 on the collection reference to only return up to the specified 
number of documents.
• You can also combine all of the 
where
 methods for filtering with 
limit()
 and 
orderBy()
.
Pagina/on
You can have a lot of data stored in your database, but you probably don't need all of 
the data all the time. Pagination allows you to split your database data into chunks 
so that you don't need to fetch all of it at once.
Firestore provides you with the 
pagination
 feature, that works in a way where you 
don't need to execute one large query, but instead multiple smaller queries 
sequentially
. Firestores library has some useful methods that you can use to divide 
your query into smaller queries, like 
startAt()

startAfter()

endAt()
 or 
endBefore()
.
Check the official 
documentation
 to learn more about pagination.
Indexing
To ensure good performance for every query, Firestore requires an index. Firestore 
automatically creates indices for the basic queries for you.
Check the official 
documentation
 to learn more about how to add indexing manually 
and how it works.

Download 19,28 Mb.

Do'stlaringiz bilan baham:
1   ...   272   273   274   275   276   277   278   279   ...   292




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish