ttfreeman
ttfreeman

Reputation: 5533

Convert Google Cloud Datastore query to Firestore query

I have a file written in Node.js for general CRUD and query in Cloud Datastore (entities, kind, and index) and I want to use the same logic for my Cloud Firestore database (collections and documents). Is there a way to convert the Datastore query syntax to Firestore for someone who is not familiar with former?

Upvotes: 0

Views: 70

Answers (1)

Alex Mamo
Alex Mamo

Reputation: 138969

Is there a way to convert the Datastore query syntax to Firestore for someone who is not familiar with former?

No, there is not, you should write your own code for that. So to query the Firestore database, you should check the official documentation regarding getting data in Cloud Firestore.

However, if you want to convert your actual Datastore database to Cloud Firestore, you can do it automatically, so please check official documentation regarding Automatic Upgrade to Cloud Firestore.

Please take also check this out:

Upvotes: 1

Related Questions