How to use Cloud DataStore or Cloud SQL from cloud functions for Firebase?

I am building a Firebase application and plan to use the real-time database when I need real-time updates. However, most application data is more traditional.

Now that functions are a thing, how can I use DataStore or CloudSQL? Can someone point me to specific documentation or examples of how to read / write using one of these services from a function?

+4
source share
1 answer

Neither Cloud Datastore nor Cloud SQL support Cloud functions, which means that you cannot yet run cloud functions based on your events the way you can using the Firebase Realtime database.

Fortunately, after the cloud function was launched (for example, via HTTP), you can still read and write from Datastore and SQL, as well as from any other Node.js code. Here is the documentation for Cloud Datastore and here for Cloud SQL .

Finally, if you are adventurous and would like to provide early feedback on upcoming integrations such as Datastore, fill out this form !

+5
source

Source: https://habr.com/ru/post/1672964/


All Articles