Skip to main content

Questions tagged [google-cloud-firestore]

Cloud Firestore is an auto-scaling real-time document database for storing, syncing, and querying data for mobile, web and server development.

google-cloud-firestore
31 votes
4 answers
10k views

Why does my function that calls an API or launches a coroutine return an empty or null value?

(Disclaimer: There are a ton of questions which arise from people asking about data being null/incorrect when using asynchronous operations through requests such as facebook,firebase, etc. My ...
a_local_nobody's user avatar
30 votes
2 answers
13k views

How to return a DocumentSnapShot as a result of a method?

A custom object that takes a parameter of (DocumentSnapShot documentsnapShot). also is an inner object from Firebase that retrieves a snapshot and set the values to my custom model also have its ...
Prolifixs's user avatar
  • 305
19 votes
1 answer
11k views

Firestore whereEqualTo, orderBy and limit(1) not working

I want to query my Workout Collection for the latest workout from a routine. Meaning I query with whereEqualTo my routineKey, order it by the Started TimeStamp in descending order and then limit to 1 ...
Jonas's user avatar
  • 7,584
16 votes
3 answers
14k views

How to return a list from Firestore database as a result of a function in Kotlin?

I'm building an app for a friend and I use Firestore. What I want is to display a list of favorite places but for some reason, the list is always empty. I cannot get the data from Firestore. This is ...
Jane Ashley's user avatar
202 votes
17 answers
102k views

Google Firestore - How to get several documents by multiple ids in one round-trip?

I am wondering if it's possible to get multiple documents by a list of ids in one round trip (network call) to the Firestore database.
Joon's user avatar
  • 9,714
29 votes
3 answers
15k views

How to paginate Firestore with Android?

I read Firestore documentation and all articles on internet(stackoverflow) about Firestore pagination but no luck. I tried to implement the exact code in docs, but nothing happens. I have a basic ...
Johans Bormman's user avatar
10 votes
1 answer
7k views

How to check a certain data already exists in firestore or not

Before adding a new data into the firestore, i want to check already a data of the same kind exists in the database or not.if already a data was present means i want to prevent the user from entering ...
Ragavendra vignesh's user avatar
100 votes
17 answers
63k views

Firestore: How to get random documents in a collection

It is crucial for my application to be able to select multiple documents at random from a collection in firebase. Since there is no native function built in to Firebase (that I know of) to achieve a ...
Garret Kaye's user avatar
  • 2,532
496 votes
28 answers
438k views

No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase

I am building a Flutter application and I have integrated Firebase, but I keep getting this error when I click on a button either to register, login, or logout. I have seen other people have asked the ...
Kennedy Owusu's user avatar
58 votes
13 answers
28k views

How to perform compound queries with logical OR in Cloud Firestore?

From the docs: You can also chain multiple where() methods to create more specific queries (logical AND). How can I perform an OR query? Example: Give me all documents where the field status is ...
ProblemsOfSumit's user avatar
185 votes
12 answers
199k views

Why is my React component is rendering twice?

I don't know why my React component is rendering twice. So I am pulling a phone number from params and saving it to state so I can search through Firestore. Everything seems to be working fine except ...
Raul Sanchez's user avatar
  • 1,919
332 votes
30 answers
291k views

Cloud Firestore collection count

Is it possible to count how many items a collection has using the new Firebase database, Cloud Firestore? If so, how do I do that?
Guilherme Torres Castro's user avatar
216 votes
28 answers
168k views

Google Firestore: Query on substring of a property value (text search)

I am looking to add a simple search field, would like to use something like collectionRef.where('name', 'contains', 'searchTerm') I tried using where('name', '==', '%searchTerm%'), but it didn't ...
tehfailsafe's user avatar
  • 3,393
15 votes
1 answer
9k views

What is denormalization in Firebase Cloud Firestore?

What is really this denormalization all about when talking about Firebase Cloud Firestore? I read a few articles on the internet and some answers here on stackoverflow and most of the answers ...
Dave's user avatar
  • 209
21 votes
4 answers
16k views

How to list subcollections in a Cloud Firestore document

Say I have this minimal database stored in Cloud Firestore. How could I retrieve the names of subCollection1 and subCollection2? rootCollection { aDocument: { someField: { value: 1 }, ...
skylize's user avatar
  • 1,411

15 30 50 per page
1
2 3 4 5
272