grahamearley / FirestoreGoogleAppsScript

A Google Apps Script library for accessing Google Cloud Firestore.
http://grahamearley.website/blog/2017/10/18/firestore-in-google-apps-script.html
MIT License
648 stars 109 forks source link

Make updateDocument mask default to true #169

Open legenduzo opened 12 months ago

legenduzo commented 12 months ago

Please consider making the mask in updateDocument(path, fields, mask = false) true instead of false.

By default the expectation of the end-user is that the fields specified in fields are updated and it comes as a rude shock if the whole document is overwritten and it's just their new update that is reflected.

Defaulting mask = true will be consistent with document updates, with the optional choice of overwriting the whole document by consciously setting it to false.