TableTransaction class

Helper to build a list of transaction actions

Constructors

TableTransaction(TransactionAction[])

Properties

actions

List of actions to perform in a transaction

Methods

createEntity<T>(TableEntity<T>)

Adds a create action to the transaction

deleteEntity(string, string)

Adds a delete action to the transaction

updateEntity<T>(TableEntity<T>, UpdateMode, UpdateTableEntityOptions)

Adds an update action to the transaction

updateEntity<T>(TableEntity<T>, UpdateTableEntityOptions)

Adds an update action to the transaction

upsertEntity<T>(TableEntity<T>, UpdateMode)

Adds an upsert action to the transaction, which inserts if the entity doesn't exist or updates the existing one

Constructor Details

TableTransaction(TransactionAction[])

new TableTransaction(actions?: TransactionAction[])

Parameters

actions

TransactionAction[]

Property Details

actions

List of actions to perform in a transaction

actions: TransactionAction[]

Property Value

Method Details

createEntity<T>(TableEntity<T>)

Adds a create action to the transaction

function createEntity<T>(entity: TableEntity<T>)

Parameters

entity

TableEntity<T>

entity to create

deleteEntity(string, string)

Adds a delete action to the transaction

function deleteEntity(partitionKey: string, rowKey: string)

Parameters

partitionKey

string

partition key of the entity to delete

rowKey

string

rowKey of the entity to delete

updateEntity<T>(TableEntity<T>, UpdateMode, UpdateTableEntityOptions)

Adds an update action to the transaction

function updateEntity<T>(entity: TableEntity<T>, updateMode: UpdateMode, updateOptions?: UpdateTableEntityOptions)

Parameters

entity

TableEntity<T>

entity to update

updateMode
UpdateMode

update mode

updateOptions
UpdateTableEntityOptions

options for the update operation

updateEntity<T>(TableEntity<T>, UpdateTableEntityOptions)

Adds an update action to the transaction

function updateEntity<T>(entity: TableEntity<T>, updateOptions?: UpdateTableEntityOptions)

Parameters

entity

TableEntity<T>

entity to update

updateOptions
UpdateTableEntityOptions

options for the update operation

upsertEntity<T>(TableEntity<T>, UpdateMode)

Adds an upsert action to the transaction, which inserts if the entity doesn't exist or updates the existing one

function upsertEntity<T>(entity: TableEntity<T>, updateMode?: UpdateMode)

Parameters

entity

TableEntity<T>

entity to upsert

updateMode
UpdateMode

update mode