Class IntermediateDataOperation<T>
Type Parameters
- T extends JSONSerializable
The expected value type from this operation.
Methods
add
-
Adds
valueto the current value of the key, if both the current value andvalueare arrays thenvaluewill be appended to the current value.Parameters
- value: number | JSONSerializable[]
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: number | JSONSerializable[]
and
-
Applies a bitwise AND to the current value of the key with
value.Parameters
- value: number
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: number
ceiling
-
Rounds up the current value to the nearest integer.
Returns IntermediateDataOperation<T>
commit
-
Commit the current operations to data store and return a Promise with the updated key, once fulfilled.
Parameters
- awaitReply: true
If
true, a promise will be returned with the new value. Otherwise, immediately resolves.
Returns Promise<T>
- awaitReply: true
-
Commit the current operations to data store.
Parameters
OptionalawaitReply: false
Returns Promise<void>
default
-
If the key has no value yet, sets the current value of the key to
default.Returns IntermediateDataOperation<T>
floor
-
Rounds down the current value to the nearest integer.
Returns IntermediateDataOperation<T>
leftShift
-
Applies a bitwise left-shift to the current value of the key by
value.Parameters
- value: number
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: number
max
-
Sets the current value of the key to
valueifvalueis bigger.Parameters
- value: number
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: number
min
-
Sets the current value of the key to
valueifvalueis bigger.Parameters
- value: number
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: number
multiply
-
Multiplies the current value of the key by
value.Parameters
- value: number
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: number
or
-
Applies a bitwise OR to the current value of the key with value.
Parameters
- value: number
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: number
pop
-
List or Dict only: for
listsit will remove the index of thevaluegiven. Fordictsit removes the element with the specified key ofvalue.Parameters
- value: JSONSerializable
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: JSONSerializable
power
-
Multiplies the current value of the key to the power of
value.Parameters
- value: number
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: number
remainder
-
Sets the current value of the key to the remainder after division by
value.Parameters
- value: number
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: number
remove
-
List only: removes the first instance of
valuefound in the list.Parameters
- value: JSONSerializable
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: JSONSerializable
replace
-
Sets the current value of the key to
value.Parameters
- value: JSONSerializable
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: JSONSerializable
rightShift
-
Applies a bitwise right-shift to the current value of the key by
value.Parameters
- value: number
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: number
update
-
Dict only: Updates the dictionary with the specified elements given in
valuecreating new keys, or updating old ones if they previously existed.Parameters
- value: JSONSerializable
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: JSONSerializable
xor
-
Applies a bitwise XOR to the current value of the key with value.
Parameters
- value: number
A value for the operation to apply against the current data storage value.
Returns IntermediateDataOperation<T>
- value: number
An intermediate abstract object holding an array of data storage operations to be performed in order by the server.