Methods
(static) decrement(valueopt) → {ReactiveDb.UpdateOperator}
Builds a UpdateOperator
that will decrement the document field it applies to
by the given value.
When the update operation is performed, if the document field doesn't exist, it is created and initialized with the given value. If the document field exists but has not a numeric value, it is overwritten with the given value.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
number |
<optional> |
1 | The value by which to decrement the document field. |
Returns:
(static) delete() → {ReactiveDb.UpdateOperator}
Builds a UpdateOperator
that will delete the document field it applies to (if
existing).
Returns:
(static) increment(valueopt) → {ReactiveDb.UpdateOperator}
Builds a UpdateOperator
that will increment the document field it applies to
by the given value.
When the update operation is performed, if the document field doesn't exist, it is created and initialized with the given value. If the document field exists but has not a numeric value, it is overwritten with the given value.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
number |
<optional> |
1 | The value by which to increment the document field. |
Returns:
(static) serverDate() → {ReactiveDb.UpdateOperator}
Builds a UpdateOperator
that will set (create or overwrite) the document
field it applies to with the timestamp of the server clock when the update operation will be performed.
Returns:
(static) set(value) → {ReactiveDb.UpdateOperator}
Builds a UpdateOperator
that will set (create or overwrite) the document field
it applies to with the given value.
Parameters:
Name | Type | Description |
---|---|---|
value |
ReactiveDb.DocumentData | The value of the document field to set. |