CosmosUniqueKey Interface
Implements
public interface CosmosUniqueKey
implements Annotation
Represents a unique key on that enforces uniqueness constraint on items in the container in the Azure Cosmos DB service.
For containers, the value of partition key is implicitly a part of each unique key.
Uniqueness constraint is also enforced for missing values.
For instance, if unique key policy defines a unique key with single property path, there could be only one item that has missing value for this property.
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract String[] |
paths()
A set of paths which must be unique for each item in the Azure Cosmos DB service. |
Method Details
paths
public abstract String[] paths()
A set of paths which must be unique for each item in the Azure Cosmos DB service.
The paths to enforce uniqueness on. Each path is a rooted path of the unique property in the item, such as "/name/first".
Returns:
Applies to
Azure SDK for Java