You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FR] Add support for minimum and maximum field transforms #7479
api: firestoreIssues related to the Firestore API.library: nodejs-firestoreIssues transferred from another repositorypriority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
The minimum and maximum field transforms (which are available in the REST API) have not been implemented in the Firestore Node SDK
Describe the solution you'd like
I imagine the API for this would look very much like FieldValue.increment(...), and would look something like:
// ...
const washingtonRef = db.collection('cities').doc('DC');
// Atomically set the value of population to the minimum of 50 or it's existing value
const res = await washingtonRef.update({
population: FieldValue.minimum(50)
});
Describe alternatives you've considered
n/a
Additional context
n/a
Reacted by Jamshed, Brett Willis and Frank van Puffelen
Thank you for this feature request! We have talked about adding this internally before, but have not yet prioritized this work. We can revisit this decision now that we have some customer demand.
api: firestoreIssues related to the Firestore API.library: nodejs-firestoreIssues transferred from another repositorypriority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
Activity
schmidt-sebastian commentedon Mar 18, 2022
Thank you for this feature request! We have talked about adding this internally before, but have not yet prioritized this work. We can revisit this decision now that we have some customer demand.