FSharp.Azure.Cosmos 1.1.0

Edit this page

Operations Module

Type extensions

Type extension Description

this.AddPostTrigger

Full Usage: this.AddPostTrigger

Parameters:
    trigger : string

Extended Type: ItemRequestOptions

trigger : string

this.AddPostTriggers

Full Usage: this.AddPostTriggers

Parameters:
    triggers : string seq - Trigger names.

Adds post-triggers to request options.

Extended Type: ItemRequestOptions

triggers : string seq

Trigger names.

ArgumentNullException Thrown when triggers is .

this.AddPreTrigger

Full Usage: this.AddPreTrigger

Parameters:
    trigger : string - Trigger name.

Adds a pre-trigger to request options.

Extended Type: ItemRequestOptions

trigger : string

Trigger name.

this.AddPreTriggers

Full Usage: this.AddPreTriggers

Parameters:
    triggers : string seq - Trigger names.

Adds pre-triggers to request options.

Extended Type: ItemRequestOptions

triggers : string seq

Trigger names.

ArgumentNullException Thrown when triggers is .

this.CountAsync

Full Usage: this.CountAsync

Parameters:
Returns: Task<int>

Counts the number of items in the container with specified QueryRequestOptions.

Extended Type: Container

requestOptions : QueryRequestOptions

Request options

cancellationToken : CancellationToken

Cancellation token

Returns: Task<int>

this.CountAsync

Full Usage: this.CountAsync

Parameters:
Returns: Task<int>

Counts the number of items in the container partition with specified key.

If no partition key is provided, the count will be for the entire container.

Extended Type: Container

partitionKey : Nullable<PartitionKey>

Partition key

cancellationToken : CancellationToken

Cancellation token

Returns: Task<int>

this.CountAsync

Full Usage: this.CountAsync

Parameters:
    partitionKey : string - Partition key
    cancellationToken : CancellationToken - Cancellation token

Returns: Task<int>

Counts the number of items in the container partition with specified key.

If no partition key is provided, the count will be for the entire container.

Extended Type: Container

partitionKey : string

Partition key

cancellationToken : CancellationToken

Cancellation token

Returns: Task<int>

this.ExistsAsync

Full Usage: this.ExistsAsync

Parameters:
Returns: Task<bool>

Checks if an item with specified Id exists in the container.

Without a requestOptions partition key, the query spans every partition: the same Id can exist in more than one logical partition, so any positive count is treated as a match.

Extended Type: Container

id : string

Item Id

requestOptions : QueryRequestOptions

Request options

cancellationToken : CancellationToken

Cancellation token

Returns: Task<bool>

this.ExistsAsync

Full Usage: this.ExistsAsync

Parameters:
Returns: Task<bool>

Checks if an item with specified Id exists in the container partition with specified key.

Extended Type: Container

id : string

Item Id

partitionKey : PartitionKey

Partition key

cancellationToken : CancellationToken

Cancellation token

Returns: Task<bool>

this.IsNotDeletedAsync

Full Usage: this.IsNotDeletedAsync

Parameters:
    deletedFieldName : string - Name of the item field that marks the item as deleted.
    id : string - Item Id
    requestOptions : QueryRequestOptions - Query request options, for example to scope the query to a partition key.
    cancellationToken : CancellationToken - Cancellation token

Returns: Task<bool> true when the item exists and is not marked as deleted; otherwise false.

Checks whether an item with the specified Id exists and is not marked as deleted.

The item is treated as not deleted when the deletedFieldName field is absent, , or false. Any other value, such as true or a deletion timestamp, marks the item as deleted.

Extended Type: Container

deletedFieldName : string

Name of the item field that marks the item as deleted.

id : string

Item Id

requestOptions : QueryRequestOptions

Query request options, for example to scope the query to a partition key.

cancellationToken : CancellationToken

Cancellation token

Returns: Task<bool>

true when the item exists and is not marked as deleted; otherwise false.

ArgumentNullException Thrown when deletedFieldName is .
ArgumentException Thrown when deletedFieldName does not start with a letter or underscore, or contains characters other than letters, digits, or underscores.

this.LongCountAsync

Full Usage: this.LongCountAsync

Parameters:
Returns: Task<int64>

Counts the number of items in the container with specified QueryRequestOptions.

Extended Type: Container

requestOptions : QueryRequestOptions

Request options

cancellationToken : CancellationToken

Cancellation token

Returns: Task<int64>

this.LongCountAsync

Full Usage: this.LongCountAsync

Parameters:
Returns: Task<int64>

Counts the number of items in the container partition with specified key.

If no partition key is provided, the count will be for the entire container.

Extended Type: Container

partitionKey : Nullable<PartitionKey>

Partition key

cancellationToken : CancellationToken

Cancellation token

Returns: Task<int64>

this.LongCountAsync

Full Usage: this.LongCountAsync

Parameters:
    partitionKey : string - Partition key
    cancellationToken : CancellationToken - Cancellation token

Returns: Task<int64>

Counts the number of items in the container partition with specified key.

If no partition key is provided, the count will be for the entire container.

Extended Type: Container

partitionKey : string

Partition key

cancellationToken : CancellationToken

Cancellation token

Returns: Task<int64>

Active patterns

Active pattern Description

(|CosmosException|_|) ex

Full Usage: (|CosmosException|_|) ex

Parameters:
Returns: CosmosException voption
ex : Exception
Returns: CosmosException voption

(|HandleException|_|) ex

Full Usage: (|HandleException|_|) ex

Parameters:
Returns: CosmosException voption
ex : Exception
Returns: CosmosException voption