Connecting to Cloud Firestore
Creating a new connection
- Open the connections dialogue. See managing connections for more information.
- Click the
New Connection
button at the bottom-left of the dialogue. - From the
Database
dropdown, selectCloud Firestore
. - Give your connection a
Name
so you can easily identify it. - Enter the Google Cloud
Project ID
for your Cloud Firestore database. - Select your authentication strategy. You can either delegate access to a service account provided by Ezfire or provide a service account key for your own service account. See authenticating a Google Cloud Service for more information. In particular, the service account needs one of the following roles:
roles/datastore.viewer
for a read-only connection.roles/datastore.user
for a read/write connection.
- Click the
Save
button to save your connection.
Your Cloud Firestore connection is now ready to use.
JavaScript API
Cloud Firestore connections support running JavaScript queries. For these queries, the db
global supports the Firestore
API from the @google-cloud/firestore
NPM package. See the official documentation for more information.