FSharp.Azure.Cosmos 1.1.0

Edit this page

PatchConcurrentlyOperation<'T, 'E> Type

A patch of an item of type that is computed from the item's current state and applied with optimistic concurrency.

Each attempt reads the item, passes it to Update to compute the patch operations, and applies them only if the item still has the eTag it was read with. After a precondition failure (HTTP 412) the next attempt starts over with a fresh read. is the type of the error the update function can return to stop the operation.

Record fields

Record Field Description

Id

Full Usage: Id

Field type: string

Id of the item to patch

Field type: string

PartitionKey

Full Usage: PartitionKey

Field type: PartitionKey

Partition key of the item to patch

Field type: PartitionKey

RequestOptions

Full Usage: RequestOptions

Field type: PatchItemRequestOptions

Options applied to every patch attempt; the eTag of each attempt is set on a copy, never on this object

Field type: PatchItemRequestOptions

Update

Full Usage: Update

Field type: 'T -> Task<Result<PatchOperation list, 'E>>

Computes the patch operations to apply from the current item, or returns an error to stop the operation.

Runs once per attempt, so it runs again with the re-read item after every precondition failure (HTTP 412). Keep it free of side effects that are unsafe to repeat.

Field type: 'T -> Task<Result<PatchOperation list, 'E>>