RomainVialard / FirebaseApp

Google Apps Script binding for Firebase Realtime Database
Apache License 2.0
117 stars 30 forks source link

optQueryParameters argument does not work in updateData #13

Closed webstermath closed 6 years ago

webstermath commented 6 years ago

When I try to add query parameters to an updateData call, I get the following error:

Error: Querying related parameters not supported on this request type (line 322, file "Code", project "FirebaseApp")

Is Firebase not able to add query parameters to update calls and there is just an error in the documentation? Or is it possible, and there is a bug in the code?

By the way, I love this library. It's power and simplicity have allowed me to build a world of web apps for my employer. Thank you so much for all your hard work.

JeanRemiDelteil commented 6 years ago

@webstermath can you detail which query parameters you are using ? Some parameters can not be used with updateData call (correspond to a PATCH REST request)

webstermath commented 6 years ago

I am trying to use the orderBy parameter along with filtering parameters. My goal is to do multiple updates at one time to a select set of records. Is this possible?

JeanRemiDelteil commented 6 years ago

Ah, this is not how the update request works ! You can only update one location at a time, please find more details in the PATCH REST request documentation.

The parameters to get a set of records are here to filters the results that you get back, not the actions of Patching.

webstermath commented 6 years ago

Oh ok, sorry I could not seem to find that behavior in the Firebase documentation. Thank you so much.

On Wed, Oct 10, 2018 at 9:00 AM Jean-Rémi Delteil notifications@github.com wrote:

Ah, this is not how the update request works ! You can only update one location at a time, please find more details in the PATCH REST request https://firebase.google.com/docs/reference/rest/database/#section-query-parameters documentation.

The parameters to get a set of records are here to filters the results that you get back, not the actions of Patching.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RomainVialard/FirebaseApp/issues/13#issuecomment-428630020, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0EYoutps4gpTpeOcoUxlaEDCw1VaEgks5ujhmfgaJpZM4XAMHs .