Skip to content

[FR] Add support for minimum and maximum field transforms #7479

Open

Description

@ChrisSSocha

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

Activity

  1. added
    priority: p3
    type: feature request
    on Mar 17, 2022
  2. added
    api: firestore
    on Mar 17, 2022
  3. schmidt-sebastian commented on Mar 18, 2022

    @schmidt-sebastian
    Contributor

    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.

  4. removed their assignment
    on Apr 14, 2022
  5. added
    type: feature request
    api: firestore
    priority: p3
    library: nodejs-firestore
    on Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: firestorelibrary: nodejs-firestorepriority: p3type: feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions