CompositePath Class
- java.
lang. Object - JsonSerializable
- com.
microsoft. azure. cosmosdb. CompositePath
- com.
public class CompositePath extends JsonSerializable
Represents a composite path of the IndexingPolicy in the Azure Cosmos DB database service. A composite path is used in a composite index. For example if you want to run a query like "SELECT * FROM c ORDER BY c.age, c.height", then you need to add "/age" and "/height" as composite paths to your composite index.
Constructor Summary
Constructor | Description |
---|---|
CompositePath() |
Constructor. |
CompositePath(String jsonString) |
Constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Composite |
getOrder()
Gets the sort order for the composite path. For example if you want to run the query "SELECT * FROM c ORDER BY c.age asc, c.height desc", then you need to make the order for "/age" "ascending" and the order for "/height" "descending". |
String |
getPath()
Gets path. |
void |
setOrder(CompositePathSortOrder order)
Gets the sort order for the composite path. For example if you want to run the query "SELECT * FROM c ORDER BY c.age asc, c.height desc", then you need to make the order for "/age" "ascending" and the order for "/height" "descending". |
void |
setPath(String path)
Sets path. |
Inherited Members
Constructor Details
CompositePath
public CompositePath()
Constructor.
CompositePath
public CompositePath(String jsonString)
Constructor.
Parameters:
Method Details
getOrder
public CompositePathSortOrder getOrder()
Gets the sort order for the composite path.
For example if you want to run the query "SELECT * FROM c ORDER BY c.age asc, c.height desc", then you need to make the order for "/age" "ascending" and the order for "/height" "descending".
Returns:
getPath
public String getPath()
Gets path.
Returns:
setOrder
public void setOrder(CompositePathSortOrder order)
Gets the sort order for the composite path.
For example if you want to run the query "SELECT * FROM c ORDER BY c.age asc, c.height desc", then you need to make the order for "/age" "ascending" and the order for "/height" "descending".
Parameters:
setPath
public void setPath(String path)
Sets path.
Parameters:
Applies to
Azure SDK for Java