FirebaseDatabase Framework Reference

ServerValue

classServerValue:NSObject

Placeholder values you may write into Firebase Database as a value orpriority that will automatically be populated by the Firebase Databaseserver.

  • Placeholder value for the number of milliseconds since the Unix epoch

    Declaration

    Swift

    classfunctimestamp()->[AnyHashable:Any]
  • Returns a placeholder value that can be used to atomically increment the current database value by the provided delta.

    The delta must be a long or double value. If the current value is not an integer or double, or if the data does not yet exist, the transformation will set the data to the delta value. If either of the delta value or the existing data are doubles, both values will be interpreted as doubles. Double arithmetic and representation of double values follow IEEE 754 semantics. If there is positive/negative integer overflow, the sum is calculated as a double.

    Declaration

    Swift

    classfuncincrement(_delta:NSNumber)->[AnyHashable:Any]

    Parameters

    delta

    the amount to modify the current value atomically.

    Return Value

    a placeholder value for modifying data atomically server-side.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-03-11 UTC.