google-cloud-firestore

Why enabling offline support for all devices isn't recommended?

╄→гoц情女王★ 提交于 2020-01-16 09:13:08
问题 In the firebase documentation https://firebase.google.com/docs/firestore/manage-data/enable-offline there is a paragraph about offline persistence. For the web, offline persistence is disabled by default. To enable persistence, call the enablePersistence method. Cloud Firestore's cache isn't automatically cleared between sessions. Consequently, if your web app handles sensitive information, make sure to ask the user if they're on a trusted device before enabling persistence. Why is it in

Why does firestore not work with multiple field range filters?

落花浮王杯 提交于 2020-01-16 09:09:12
问题 Why does firestore not work with multiple field range filters? I also want to know why I can not do full text search. Is there a reason for the algorithm? I want to know the reason. 回答1: Firestore has a quite unique performance guarantee: the time it takes to retrieve data only depends on the amount of data you retrieve, not on the amount of data you retrieve it from. So no matter if there are a thousand, a million, or a billion documents in a collection, retrieving ten of those documents

What is the use case of reference type in Firestore Document and how to use it specially in an android app?

穿精又带淫゛_ 提交于 2020-01-16 08:33:08
问题 In my Android app, if I get the document path by getting the value of reference type field of a document then how am I going to call it? Because the reference path I'm going to get would be something like /Users/OctUsers/1stWeekUsers/OlCvJFfWZeAlcttdlgzz/ and method for retrieving a Firestore document is something like FirebaseFirestore.getInstance().collection(collectionPath).document(documentPath).collection(collectionPath).document(documentPath) and so on. How am I going to iterate over

Created data from Firebase database keeps overlapping on one another

北慕城南 提交于 2020-01-16 08:19:28
问题 Can you help me with my problem? I managed to read my data from the Firebase Database but for some reason they look like this: What I want is to just have them displayed correctly in a column like manner with an image in the background my code that is used to build the widgets is below: Widget buildItem(DocumentSnapshot doc) { return Padding( padding: const EdgeInsets.all(8.0), child: Column( // crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ Text('Name: ${doc.data[

Firebase Firestore Security Rules Variable not used

半腔热情 提交于 2020-01-16 00:41:12
问题 Writing rules for Firestore it seems that custom variables are not working. Did anyone know why or have seen similar behaviour? Using the below I got access denied although the uid is in the array of admin. service cloud.firestore { match /databases/{database}/documents { match /conferences/{confid} { allow read,write: if request.auth.uid in get(/databases/$(database)/documents/conferences/$(confid)).data.admin; } } } Simulator is giving the below error: Function [get] called with path to

Angularfire2 attach more data to user collection

孤街浪徒 提交于 2020-01-15 11:18:19
问题 I am creating an app where users can create groups. group collection is stored inside each user, and if owner of the group ads members corresponding users id and role only saved inside group collection. So when owner visits group members i wish to show full info of users which is in another collection out side groups. these are two collections in my firestore database this.afs.collection(`users/${ownerId}/groups/${gid}/users`) this.afs.doc(`users/${ownerId}`) //full user data here is how i

Angularfire2 attach more data to user collection

浪子不回头ぞ 提交于 2020-01-15 11:18:07
问题 I am creating an app where users can create groups. group collection is stored inside each user, and if owner of the group ads members corresponding users id and role only saved inside group collection. So when owner visits group members i wish to show full info of users which is in another collection out side groups. these are two collections in my firestore database this.afs.collection(`users/${ownerId}/groups/${gid}/users`) this.afs.doc(`users/${ownerId}`) //full user data here is how i

How does the Cloud Firestore Batched writes work in offline mode

感情迁移 提交于 2020-01-15 10:18:26
问题 In the doc about Cloud Firestore Batched writes I read "You can perform batched writes even when the user's device is offline." Can this be turned off or is it off by default since the text say "can". The Cloud Firestore Transaction will fail if it´s offline and I would like Batched writes to do the same I get the feeling I have to check for the result in the OnCompleteListener : batch.commit().addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull

FireStore - how to get around array “does-not-contain” queries

不想你离开。 提交于 2020-01-15 10:15:39
问题 After some research, it's seems clear that I cannot use FireStore to query items a given array does NOT contain. Does anyone have a workaround for this use case?... After a user signs up, the app fetches a bunch of cards that each have a corresponding "card" document in FireStore. After a user interacts with a card, the card document adds the user's uid to a field array (ex: usersWhoHaveSeenThisCard: [userUID]) and the "user" document adds the card's uid to a field array (ex:

how to get the document id of a document that has a field with a specific value?

谁说胖子不能爱 提交于 2020-01-15 10:14:27
问题 I would like to get the document id of a document which has a field that has a specific value for example in this collection, i would like to retrieve the document id of the document where the "itemName" is "eggroll. 回答1: To solve this, please try the following lines of code: FirebaseFirestore rootRef = FirebaseFirestore.getInstance(); CollectionReference deliveryRef = rootRef.collection("delivery"); Query nameQuery = deliveryRef.whereEqualTo("itemName", "eggroll"); nameQuery.get()