google-cloud-firestore

Firestore read rules with self condition

假如想象 提交于 2020-01-10 08:31:39
问题 I'm currently trying to build small app on firebase as an evaluation of it. It looks interesting and super productive, but I have one problem with firestore rules. I have one collection (games) with objects looking like this: { "name":String, "description":String, "owners": { "uid": String "uid2": String } } And rules set like this: service cloud.firestore { match /databases/{database}/documents { match /games { match /{game} { allow write: if request.auth != null && request.resource.data

Firestore read rules with self condition

自作多情 提交于 2020-01-10 08:31:12
问题 I'm currently trying to build small app on firebase as an evaluation of it. It looks interesting and super productive, but I have one problem with firestore rules. I have one collection (games) with objects looking like this: { "name":String, "description":String, "owners": { "uid": String "uid2": String } } And rules set like this: service cloud.firestore { match /databases/{database}/documents { match /games { match /{game} { allow write: if request.auth != null && request.resource.data

Flutter: Firestore component is not present

风流意气都作罢 提交于 2020-01-10 06:06:29
问题 I have a problem with Firestore database under Flutter. I have done everything, what the package setup documentation says, looked into 2-3 finished public application, and tried to use the package as others use. I even tried to implement native Firestore initialization, because i think the problem is on the platform side, but still, the application get java.lang.NullPointerException: Firestore component is not present. when i try to use the Firestore instance. In project/build.gradle I set

Flutter: Firestore component is not present

时光总嘲笑我的痴心妄想 提交于 2020-01-10 06:06:27
问题 I have a problem with Firestore database under Flutter. I have done everything, what the package setup documentation says, looked into 2-3 finished public application, and tried to use the package as others use. I even tried to implement native Firestore initialization, because i think the problem is on the platform side, but still, the application get java.lang.NullPointerException: Firestore component is not present. when i try to use the Firestore instance. In project/build.gradle I set

Swift - Firebase - order collection

这一生的挚爱 提交于 2020-01-10 05:56:28
问题 I am trying to retrieve some documents but I need them to be ordered by some data ("ListIDX") inside my "Wishlists" - collection . I tried this but that's not allowed: db.collection("users").document(userID).collection("wishlists").order(by: "ListIDX").document(list.name).collection("wünsche").getDocuments() This is my function : func getWishes (){ let db = Firestore.firestore() let userID = Auth.auth().currentUser!.uid var counter = 0 for list in self.dataSourceArray { print(list.name) // ->

Swift - Firebase - order collection

为君一笑 提交于 2020-01-10 05:56:04
问题 I am trying to retrieve some documents but I need them to be ordered by some data ("ListIDX") inside my "Wishlists" - collection . I tried this but that's not allowed: db.collection("users").document(userID).collection("wishlists").order(by: "ListIDX").document(list.name).collection("wünsche").getDocuments() This is my function : func getWishes (){ let db = Firestore.firestore() let userID = Auth.auth().currentUser!.uid var counter = 0 for list in self.dataSourceArray { print(list.name) // ->

Order by document id firestore?

让人想犯罪 __ 提交于 2020-01-10 05:24:19
问题 I have been trying to figure out a way to query a list of documents where I have a range filter on one field and order by another field which of course isn't possible, see my other question: Order by timestamp with range filter on different field Swift Firestore But is it possible to save documents with the timestamp as id and then it would sort by default? Or maybe hardcode an ID, then retrieve the last created document id and increase id by one for the next post to be uploaded? This shows

How to fix “firestore: quota exceeded error while uploading rules”

亡梦爱人 提交于 2020-01-10 05:14:08
问题 I am getting an error when deploying rules using the deploy command in CI firebase deploy --only firestore:rules --non-interactive Output: i deploying firestore i firestore: checking firestore.rules for compilation errors... ✔ firestore: rules file firestore.rules compiled successfully i firestore: uploading rules firestore.rules... i firestore: quota exceeded error while uploading rules ? You have 2501 rules, do you want to delete the oldest 10 to free up space? (y/N) I can fix the problem

How to create multi environment DB's with Firestore

霸气de小男生 提交于 2020-01-09 19:48:40
问题 I've been looking how to create multiple Firestore instances in Firebase, I need different Db's for prod, staging and development. I read the documentation and seems that I only need to modify the "Google-services.json" file in the applications. what I don't get is what should I modify and how that would look in the console. Am I going to see different instances in the same project? I need to create different projects for every environment and modify those values in the file? If I need to

Why is it consuming much time to retrieve data from firestore with flutter?

与世无争的帅哥 提交于 2020-01-07 08:21:23
问题 first,I added an animation, after animation completed I called below code line but it's consuming too much time. getData()async{ DateTime now = DateTime.now(); await Firestore.instance.collection('Table_Name').getDocuments().then((QuerySnapshot snapshot){ print("length ${snapshot.documents.length}"); for(int i = 0 ; i< snapshot.documents.length; i++){ bool isToday = snapshot.documents[i].data['CreatedBy'].toString().split(" ")[0]==DateFormat("yyyy-MM-dd").format(now); print("isTOday $isToday"