Methods
-
addOperation(operationType, entity [, options])
-
Adds an operation to the batch after performing checks.
Parameters:
Name Type Argument Description operationType
string The type of operation to perform. See Constants.TableConstants.Operations
entity
object The entity.
options
object <optional>
The request options.
- Source:
-
clear()
-
Removes all of the operations from the batch.
- Source:
-
deleteEntity(entity)
-
Adds a delete operation to the batch.
Parameters:
Name Type Description entity
object The entity.
- Source:
-
getOperation(index)
-
Gets an operation from the batch. Returns null if the index does not exist.
Parameters:
Name Type Description index
number The index in the operations array at which to remove an element.
- Source:
Returns:
The removed operation.
- Type
- object
-
hasOperations()
-
Returns a boolean value indicating weather there are operations in the batch.
- Source:
Returns:
True if there are operations queued up; false otherwise.
- Type
- Boolean
-
insertEntity(entity [, options])
-
Adds an insert operation to the batch.
Parameters:
Name Type Argument Description entity
object The entity.
options
object <optional>
The request options.
Properties
Name Type Argument Description echoContent
string <optional>
Whether or not to return the entity upon a successful insert. Inserts only, default to false.
payloadFormat
string <optional>
The payload format to use for the request.
propertyResolver
TableService~propertyResolver <optional>
The property resolver. Only applied if echoContent is true. Given the partition key, row key, property name,
property value, and the property Edm type if given by the service, returns the Edm type of the property.entityResolver
function <optional>
The entity resolver. Only applied if echoContent is true. Given the single entity returned by the insert, returns
a modified object.- Source:
-
insertOrMergeEntity(entity)
-
Adds an insert or merge operation to the batch.
Parameters:
Name Type Description entity
object The entity.
- Source:
-
insertOrReplaceEntity(entity)
-
Adds an insert or replace operation to the batch.
Parameters:
Name Type Description entity
object The entity.
- Source:
-
mergeEntity(entity)
-
Adds a merge operation to the batch.
Parameters:
Name Type Description entity
object The entity.
- Source:
-
removeOperation(index)
-
Removes an operation from the batch. Returns null if the index does not exist.
Parameters:
Name Type Description index
number The index in the operations array at which to remove an element.
- Source:
Returns:
The removed operation.
- Type
- object
-
replaceEntity(entity)
-
Adds an replace operation to the batch.
Parameters:
Name Type Description entity
object The entity.
- Source:
-
retrieveEntity(partitionKey, rowKey [, options])
-
Adds a retrieve operation to the batch. Note that this must be the only operation in the batch.
Parameters:
Name Type Argument Description partitionKey
string The partition key.
rowKey
string The row key.
options
object <optional>
The request options.
Properties
Name Type Argument Description payloadFormat
string <optional>
The payload format to use for the request.
propertyResolver
TableService~propertyResolver <optional>
The property resolver. Given the partition key, row key, property name, property value,
and the property Edm type if given by the service, returns the Edm type of the property.entityResolver
function <optional>
The entity resolver. Given the single entity returned by the query, returns a modified object.
- Source:
-
size()
-
Returns the number of operations in the batch.
- Source:
Returns:
The number of operations in the batch.
- Type
- number