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 },         anotherField: { value: 2 }         subColle...
I'm currently trying Firestore, and I'm stuck at something very simple: "updating an array (aka a subdocument)".  My DB structure is super simple. For example:  proprietary: "John Doe", sharedWith:   [     {who: "[email protected]
I tried to read sorted data from Cloud Firestore using OrderBy. And Firestore returned data as Following Order:  AAA BBB aaa bbb  Now, what I want is something like following:  AAA aaa BBB bbb  I want this result only using OrderBy not by manual So...
For example I have dynamic filter for my list of books where I can set specific color, authors and categories. This filter can set multiple colors at once and multiple categories.     Book > Red, Blue > Adventure, Detective.   How can I add &...
I have project that I need to display a leaderboard of the top 20, and if the user not in the leaderboard they will appear in the 21st place with their current ranking.  Is there efficient way to this?  I am using Cloud Firestore as a database. I b...
I have fetch some data from firestore but in my query I want to add a conditional where clause. I am using async-await for api and not sure how to add a consitional where clause.  Here is my function  export async function getMyPosts (type) {   awa...
How can I listen to a specific field change with firestore js sdk ?  In the documentation, they only seem to show how to listen for the whole document, if any of the "SF" field changes, it will trigger the callback.  db.collection("cities...
I want to query a firestore database for document id. Currently I have the following code:  db.collection('books').where('id', '==', 'fK3ddutEpD2qQqRMXNW5').get()   I don't get a result. But when I query for a diff...
I am trying to filter data with multiple where() methods using the array-contains operator, however I am having the following error:  An error occured: Error: 3 INVALID_ARGUMENT:  A maximum of 1 'ARRAY_CONTAINS' filter is allowed.   Basically...
Using get() in Firestore rules on a newly created document causes the return value to be false. If you wait a few seconds and hit a security rule that calls get() on that same new document, get() will then return the expected value. Am I missing some...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.