你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
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: