google-cloud-firestore

check collection existence - Firestore

牧云@^-^@ 提交于 2021-02-08 09:51:28
问题 Example: I have to make an appointment with the Firestore before proceeding with the event scheduling function. Example in the database: - Companie1 (Document) --- name --- phone --- Schedules (Collection) -----Event 1 -----Event 2 I have a function that performs a new schedule. According to the example. I need to check if the Schedules collection exists. If it does not exist I execute the scheduling function. If I already exist I need to do another procedure. I already used this pattern and

Does firestore support collection level locks in transaction?

南笙酒味 提交于 2021-02-08 08:14:14
问题 I have worked in a mongodb, which is no sql database and it support document level locks only. As firestore is also no sql database, does it support document level locks or it allows collection level locks? 回答1: The only operation you have for locking is document locking with transactions. There is no collection locking in Firestore. 来源: https://stackoverflow.com/questions/52861431/does-firestore-support-collection-level-locks-in-transaction

Does firestore support collection level locks in transaction?

自作多情 提交于 2021-02-08 08:07:13
问题 I have worked in a mongodb, which is no sql database and it support document level locks only. As firestore is also no sql database, does it support document level locks or it allows collection level locks? 回答1: The only operation you have for locking is document locking with transactions. There is no collection locking in Firestore. 来源: https://stackoverflow.com/questions/52861431/does-firestore-support-collection-level-locks-in-transaction

Does firestore support collection level locks in transaction?

有些话、适合烂在心里 提交于 2021-02-08 08:05:09
问题 I have worked in a mongodb, which is no sql database and it support document level locks only. As firestore is also no sql database, does it support document level locks or it allows collection level locks? 回答1: The only operation you have for locking is document locking with transactions. There is no collection locking in Firestore. 来源: https://stackoverflow.com/questions/52861431/does-firestore-support-collection-level-locks-in-transaction

Could not load the default credentials. Firebase and Express error

梦想与她 提交于 2021-02-08 07:50:03
问题 I have a function to signup users in my express API. Please have a look at signup route: //Route to SIGN UP app.post('/signup', (req, res) => { const newUser = { email : req.body.email, password : req.body.password, confirmPassword: req.body.confirmPassword, handle: req.body.handle } let errors = {}; if(isEmpty(newUser.email)) errors.email = 'Must not be empty'; else if (!isEmail(newUser.email)) errors.email = 'Must be a valid email address'; if(isEmpty(newUser.password)) errors.password =

Could not load the default credentials. Firebase and Express error

余生长醉 提交于 2021-02-08 07:49:53
问题 I have a function to signup users in my express API. Please have a look at signup route: //Route to SIGN UP app.post('/signup', (req, res) => { const newUser = { email : req.body.email, password : req.body.password, confirmPassword: req.body.confirmPassword, handle: req.body.handle } let errors = {}; if(isEmpty(newUser.email)) errors.email = 'Must not be empty'; else if (!isEmail(newUser.email)) errors.email = 'Must be a valid email address'; if(isEmpty(newUser.password)) errors.password =

Firestore always make 3 api calls with one taking 60 secondes

匆匆过客 提交于 2021-02-08 06:58:22
问题 Each time I'm making a request using the Firestore library, there are 3 API calls made. One of them is taking to 60 seconds every time. I receive the data after some milliseconds, but in the network tab, I see a pending call that seems to be doing nothing. Here's my code import "firebase/firestore"; import firebase from "firebase/app"; const getData = () => { firebase .firestore() .collection("myCollection") .get(); } Each time I call getData() , 3 API calls are made. Here's the network tab:

Firestore always make 3 api calls with one taking 60 secondes

孤街醉人 提交于 2021-02-08 06:58:20
问题 Each time I'm making a request using the Firestore library, there are 3 API calls made. One of them is taking to 60 seconds every time. I receive the data after some milliseconds, but in the network tab, I see a pending call that seems to be doing nothing. Here's my code import "firebase/firestore"; import firebase from "firebase/app"; const getData = () => { firebase .firestore() .collection("myCollection") .get(); } Each time I call getData() , 3 API calls are made. Here's the network tab:

Firebase Authentication creates user but does not add their Info to database

寵の児 提交于 2021-02-08 06:36:37
问题 I am new to using firebase and ios development in general. I am having an issue with adding user's info to the firestore database even though they are being added as authenticated users. Any Suggestions? Auth.auth().createUser(withEmail: email, password: password) { (result, err) in if err != nil { self.errorLabel.text = "Error Creating User" self.errorLabel.alpha = 1 } else { let db = Firestore.firestore() db.collection("users").addDocument(data: ["firstname":firstname, "lastname":lastname,

scope issue in javascript between two Functions

允我心安 提交于 2021-02-08 06:33:10
问题 i have try to get the excel sheet using xlsx-populate so i am trying to get the values from mailEvents collections so i can add or pass the value in the init Collection function.if i have solved this issue then my problem regarding excel is also solved. in this problem i want to access the topHeader var in init collection. here in arr2 there is the values in this form ['open','processed'] const completeReport = (startTime,endTime) => { serverRef = db.collection("MailEvents"); let getDocs =