Class: Google::Firestore::V1beta1::DocumentTransform::FieldTransform
- Inherits:
-
Object
- Object
- Google::Firestore::V1beta1::DocumentTransform::FieldTransform
- Defined in:
- lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb
Overview
A transformation of a field of the document.
Defined Under Namespace
Modules: ServerValue
Instance Attribute Summary collapse
-
#append_missing_elements ⇒ Google::Firestore::V1beta1::ArrayValue
Append the given elements in order if they are not already present in the current field value.
-
#field_path ⇒ String
The path of the field.
-
#remove_all_from_array ⇒ Google::Firestore::V1beta1::ArrayValue
Remove all of the given elements from the array in the field.
-
#set_to_server_value ⇒ Google::Firestore::V1beta1::DocumentTransform::FieldTransform::ServerValue
Sets the field to the given server value.
Instance Attribute Details
#append_missing_elements ⇒ Google::Firestore::V1beta1::ArrayValue
Returns Append the given elements in order if they are not already present in the current field value. If the field is not an array, or if the field does not yet exist, it is first set to the empty array.
Equivalent numbers of different types (e.g. 3L and 3.0) are considered equal when checking if a value is missing. NaN is equal to NaN, and Null is equal to Null. If the input contains multiple equivalent values, only the first will be considered.
The corresponding transform_result will be the null value.
95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb', line 95 class FieldTransform # A value that is calculated by the server. module ServerValue # Unspecified. This value must not be used. SERVER_VALUE_UNSPECIFIED = 0 # The time at which the server processed the request, with millisecond # precision. REQUEST_TIME = 1 end end |
#field_path ⇒ String
Returns The path of the field. See Document#fields for the field path syntax reference.
95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb', line 95 class FieldTransform # A value that is calculated by the server. module ServerValue # Unspecified. This value must not be used. SERVER_VALUE_UNSPECIFIED = 0 # The time at which the server processed the request, with millisecond # precision. REQUEST_TIME = 1 end end |
#remove_all_from_array ⇒ Google::Firestore::V1beta1::ArrayValue
Returns Remove all of the given elements from the array in the field. If the field is not an array, or if the field does not yet exist, it is set to the empty array.
Equivalent numbers of the different types (e.g. 3L and 3.0) are considered equal when deciding whether an element should be removed. NaN is equal to NaN, and Null is equal to Null. This will remove all equivalent values if there are duplicates.
The corresponding transform_result will be the null value.
95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb', line 95 class FieldTransform # A value that is calculated by the server. module ServerValue # Unspecified. This value must not be used. SERVER_VALUE_UNSPECIFIED = 0 # The time at which the server processed the request, with millisecond # precision. REQUEST_TIME = 1 end end |
#set_to_server_value ⇒ Google::Firestore::V1beta1::DocumentTransform::FieldTransform::ServerValue
Returns Sets the field to the given server value.
95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb', line 95 class FieldTransform # A value that is calculated by the server. module ServerValue # Unspecified. This value must not be used. SERVER_VALUE_UNSPECIFIED = 0 # The time at which the server processed the request, with millisecond # precision. REQUEST_TIME = 1 end end |