你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
CompositePath 类
- java.
lang. Object - JsonSerializable
- com.
microsoft. azure. cosmosdb. CompositePath
- com.
public class CompositePath extends JsonSerializable
表示 Azure Cosmos DB 数据库服务中 IndexingPolicy 的复合路径。 复合路径用于复合索引。 例如,如果要运行“SELECT * FROM c ORDER BY c.age, c.height”之类的查询,则需要将“/age”和“/height”添加为复合索引的复合路径。
构造函数摘要
构造函数 | 说明 |
---|---|
CompositePath() |
构造函数。 |
CompositePath(String jsonString) |
构造函数。 |
方法摘要
修饰符和类型 | 方法和描述 |
---|---|
Composite |
getOrder()
获取复合路径的排序顺序。 例如,如果要运行查询“SELECT * FROM c ORDER BY c.age asc, c.height desc”,则需要将顺序设置为“/age”“ascending”和“/height”“descending”的顺序。 |
String |
getPath()
获取路径。 |
void |
setOrder(CompositePathSortOrder order)
获取复合路径的排序顺序。 例如,如果要运行查询“SELECT * FROM c ORDER BY c.age asc, c.height desc”,则需要将顺序设置为“/age”“ascending”和“/height”“descending”的顺序。 |
void |
setPath(String path)
设置路径。 |
继承成员
构造函数详细信息
CompositePath
public CompositePath()
构造函数。
CompositePath
public CompositePath(String jsonString)
构造函数。
Parameters:
方法详细信息
getOrder
public CompositePathSortOrder getOrder()
获取复合路径的排序顺序。
例如,如果要运行查询“SELECT * FROM c ORDER BY c.age asc, c.height desc”,则需要将顺序设置为“/age”“ascending”和“/height”“descending”的顺序。
Returns:
getPath
public String getPath()
获取路径。
Returns:
setOrder
public void setOrder(CompositePathSortOrder order)
获取复合路径的排序顺序。
例如,如果要运行查询“SELECT * FROM c ORDER BY c.age asc, c.height desc”,则需要将顺序设置为“/age”“ascending”和“/height”“descending”的顺序。
Parameters:
setPath
public void setPath(String path)
设置路径。
Parameters: