GodotNuts / GodotFirebase

Implementations of Firebase for Godot using GDScript
MIT License
554 stars 79 forks source link

[FEATURE REQUEST] Batch Data Management #201

Open Zarasan opened 3 years ago

Zarasan commented 3 years ago

Is your feature request related to a problem? Please describe. I would like to change data for every document that has same value

Describe the solution you'd like https://firebase.google.com/docs/firestore/reference/rest/v1/projects.databases.documents/batchWrite I saw that they have Batch Write in the REST API maybe it could be implemented.

Describe alternatives you've considered I have tried doing a cloud function for that call but problem is that it can be accessed from everywhere.

Additional context I tried to implement but I am not that experienced in depth with the plugin or firebase REST API. If I could get some tips I could try again

WolfgangSenff commented 3 years ago

We can probably implement this pretty easily. At the moment, I'm preparing a talk for GodotCon so cannot look into this, but we'll keep it open until we have time. Good suggestion!

Zarasan commented 3 years ago

Batch Get is easily implementable, I will put up a pr for it with my implementation soon. But Batch Write has some issues with it where it doesn't give me permission outside of their API explorer (can only give permission if it has oauth2), so I switched to implementing commit instead of Batch Write.

https://stackoverflow.com/questions/63451909/firestore-rest-api-batchwrite-permission-denied