Index.Range Method

Definition

Overloads

Range(DataType)

Returns an instance of the RangeIndex class with specified DataType for the Azure Cosmos DB service.

Range(DataType, Int16)

Returns an instance of the RangeIndex class with specified DataType and precision for the Azure Cosmos DB service.

Range(DataType)

Returns an instance of the RangeIndex class with specified DataType for the Azure Cosmos DB service.

public static Microsoft.Azure.Documents.RangeIndex Range (Microsoft.Azure.Documents.DataType dataType);
static member Range : Microsoft.Azure.Documents.DataType -> Microsoft.Azure.Documents.RangeIndex
Public Shared Function Range (dataType As DataType) As RangeIndex

Parameters

dataType
DataType

Specifies the target data type for the index path specification.

Returns

An instance of RangeIndex type.

Examples

Here is an example to create RangeIndex instance passing in the DataType:

RangeIndex rangeIndex = Index.Range(DataType.Number);

See also

Applies to

Range(DataType, Int16)

Returns an instance of the RangeIndex class with specified DataType and precision for the Azure Cosmos DB service.

public static Microsoft.Azure.Documents.RangeIndex Range (Microsoft.Azure.Documents.DataType dataType, short precision);
static member Range : Microsoft.Azure.Documents.DataType * int16 -> Microsoft.Azure.Documents.RangeIndex
Public Shared Function Range (dataType As DataType, precision As Short) As RangeIndex

Parameters

dataType
DataType

Specifies the target data type for the index path specification.

precision
Int16

Specifies the precision to be used for the data type associated with this index.

Returns

An instance of RangeIndex type.

Examples

Here is an example to create RangeIndex instance passing in the DataType and precision:

RangeIndex rangeIndex = Index.Range(DataType.Number, -1);

See also

Applies to