FSharp.Azure.Cosmos 1.1.0

Edit this page

CosmosName Module

Helpers for validating Cosmos DB item field names used in dynamically constructed queries.

Functions and values

Function or value Description

validateField paramName fieldName

Full Usage: validateField paramName fieldName

Parameters:
    paramName : string - Name of the caller's parameter to report in a thrown exception.
    fieldName : string - Field name to validate.

Validates that fieldName is a syntactically valid Cosmos DB item field name: non-null, non-empty, starting with a letter or underscore, and containing only letters, digits, or underscores.

paramName : string

Name of the caller's parameter to report in a thrown exception.

fieldName : string

Field name to validate.

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