Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question Hello everybody I am check in the official webside of firebase how to
Tag: google-cloud-firestore
Firestore: Convert time object to timestamp
I am using vue.js for my e-commerce project. I want to set the sale time limit in the firestore collection. ex)If user want to stop to sell his or her product at 15:00, user can input 15:00. Now I could set the time object in my collection. But I want to convert it to timestamp. How can I achieve it?
Change the field value in Firestore automatically after a certain time [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I’m working on Javascript and here’s how’s my data looks like. I want the functionality where after every 24 hours,
Updating Firestore Documents in Parallel Using Promise.all()
This question concerns the Firestore database, but, more generally, it concerns making async requests in parallel. Simply put, I wish to update multiple Firestore documents as quickly and efficiently as possible by mapping over an array of their document IDs. the .set() method is async (returning a promise) and so I understand that I can wrap the multiple requests –
can I get some documents from firestore simultaneously using Promise.all?
I want to get some documents from Firestore. in my callable cloud function, instead of waiting getting document one by one, await one by one, I use Promise.all so I can get all documents faster, like this and then I want to loop the document snapshots I just get, and here is the problem I have an error TypeError: Cannot
Method for coverting all Firestore Timestamps in a snapshot to JS dates?
How would you write a method to convert all Firestore Timestamps in a snapshot to JavaScript Dates? For example, a snapshot from a posts collection might return a couple Firestore Timestamps (createdDtTm, modifyDtTm): Converting the individual dates is simple enough by mapping over the array and using the toDate() method for each Timestamp (e.g., createDtTm.toDate()) But what is a more
How to update a value in multiples collections at once in firestore?
I’m building a forum appin Vue, basically a clone of this same site… The user can post questions, get answers to those questions and comments to those answers. I have a top level collection for questions, answers and comments respectively, and each document in those collections have a field called photoURL where I store the url of the profile image
Not able to retrieve data from firebase firestore
I am saving data to firebase successfully But when i try to retrieve it firestore sends “No such document”. Trying to get the array of objects. Here is the db Edit: I found out that in order to access all documents you have to do it this way. It goes into the then block but then querySnapshot.forEach doesnt run Answer
Trying to pass variable in fieldname when storing field to firestore
So basically I am trying to make the field name in this loop be EmailBody1, EmailBody2, etc. but I have tried a few different ways like making the field name itself a variable or doing EmailBody[z] or EmailBody{z} but nothing I try seems to be working and I cannot find much info online on how to do this. Any help
Firebase Firestore query an array of more than 10 elements
[ I am trying to query the post-collection with the user settings but the settings is an array of more than 10 elements and nothing is returned. I know the documents did mention the limit of 10 elements, does anyone know a workaround? Answer The workaround is to perform a query for each item in mySettings individually, and merge the