appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
33.85k stars 3.65k forks source link

[Feature] Add support for Firestore's delete field and server time stamp field values #3475

Closed sharat87 closed 3 years ago

sharat87 commented 3 years ago

Currently, there's no way to delete (aka unset) individual fields in an existing document on Firestore. In the Java API, this is done by doing an update operation with the value of the field set to admin.firestore.FieldValue.delete(). Like so:

{
  "name": "New name",
  "role": <The magical value of admin.firestore.FieldValue.delete()>
}

This, when placed in the body of an update query in Firestore action, should update the name field with "New name" and unset the role field in the document.

Similarly, support is needed for the admin.firestore.FieldValue.serverTimestamp() field value which sets the field to the current server timestamp.

tazmaniax commented 3 years ago

Also I think to able to store a Timestamp value it's necessary to use the Firestore API, e.g new firebase.firestore.Timestamp(seconds, nanoseconds) or firebase.firestore.Timestamp.fromDate(new Date("December 10, 1815")). Would this be supported in #3693 ? Also can support for GeoPoint be included? CleanShot 2021-03-27 at 17 55 14

sumitsum commented 3 years ago

Hi @tazmaniax , thanks for bringing this to our attention. As per the current plan, the scope of the PR #3693 is to provide FieldValue.delete() and FieldValue.serverTimestamp() support. I have raise another Github issue to track firebase.firestore.Timestamp and firebase.firestore.GeoPoint APIs : https://github.com/appsmithorg/appsmith/issues/3741

tazmaniax commented 3 years ago

@sumitsum thx!