Packagecom.myflashlab.air.extensions.firebase.firestore
Classpublic class FieldValue
InheritanceFieldValue Inheritance Object

Sentinel values that can be used when writing document fields with write() or updateData().



Public Methods
 MethodDefined By
  
ARRAY_REMOVE($value:Vector.<String>):String
[static] Returns a special value that can be used with set() or update() that tells the server to remove the given elements from any array value that already exists on the server.
FieldValue
  
ARRAY_UNION($value:Vector.<String>):String
[static] Returns a special value that can be used with set() or update() that tells the server to union the given elements with any array value that already exists on the server.
FieldValue
  
DELETE():String
[static] Returns a sentinel for use with update() to mark a field for deletion.
FieldValue
  
INCREMENT($value:Number):String
[static] Returns a special value that can be used with set() or update() that tells the server to increment the field's current value by the given value.
FieldValue
  
TIMESTAMP():String
[static] Returns a sentinel for use with set() or update() to include a server-generated timestamp in the written data.
FieldValue
Method Detail
ARRAY_REMOVE()method
public static function ARRAY_REMOVE($value:Vector.<String>):String

Returns a special value that can be used with set() or update() that tells the server to remove the given elements from any array value that already exists on the server. All instances of each element specified will be removed from the array. If the field being modified is not already an array it will be overwritten with an empty array.

Learn more about this feature here: https://firebase.googleblog.com/2018/08/better-arrays-in-cloud-firestore.html

Parameters

$value:Vector.<String>

Returns
String
ARRAY_UNION()method 
public static function ARRAY_UNION($value:Vector.<String>):String

Returns a special value that can be used with set() or update() that tells the server to union the given elements with any array value that already exists on the server. Each specified element that doesn't already exist in the array will be added to the end. If the field being modified is not already an array it will be overwritten with an array containing exactly the specified elements.

Learn more about this feature here: https://firebase.googleblog.com/2018/08/better-arrays-in-cloud-firestore.html

Parameters

$value:Vector.<String>

Returns
String
DELETE()method 
public static function DELETE():String

Returns a sentinel for use with update() to mark a field for deletion.

Returns
String
INCREMENT()method 
public static function INCREMENT($value:Number):String

Returns a special value that can be used with set() or update() that tells the server to increment the field's current value by the given value.

Parameters

$value:Number

Returns
String
TIMESTAMP()method 
public static function TIMESTAMP():String

Returns a sentinel for use with set() or update() to include a server-generated timestamp in the written data.

Returns
String