Package com.azure.cosmos.models
Class SqlQuerySpec
java.lang.Object
com.azure.cosmos.models.SqlQuerySpec
Represents a SQL query in the Azure Cosmos DB database service.
-
Constructor Summary
ConstructorDescriptionInitializes a new instance of the SqlQuerySpec class.SqlQuerySpec
(String queryText) Initializes a new instance of the SqlQuerySpec class with the text of the query.SqlQuerySpec
(String queryText, SqlParameter... parameters) Initializes a new instance of the SqlQuerySpec class with the text of the query and parameters.SqlQuerySpec
(String queryText, List<SqlParameter> parameters) Initializes a new instance of the SqlQuerySpec class with the text of the query and parameters. -
Method Summary
Modifier and TypeMethodDescriptionGets the container of query parameters.Gets the text of the query.setParameters
(List<SqlParameter> parameters) Sets the container of query parameters.setQueryText
(String queryText) Sets the text of the query.
-
Constructor Details
-
SqlQuerySpec
public SqlQuerySpec()Initializes a new instance of the SqlQuerySpec class. -
SqlQuerySpec
Initializes a new instance of the SqlQuerySpec class with the text of the query.- Parameters:
queryText
- the query text.
-
SqlQuerySpec
Initializes a new instance of the SqlQuerySpec class with the text of the query and parameters.- Parameters:
queryText
- the query text.parameters
- the query parameters.
-
SqlQuerySpec
Initializes a new instance of the SqlQuerySpec class with the text of the query and parameters.- Parameters:
queryText
- the query text.parameters
- the query parameters.
-
-
Method Details
-
getQueryText
Gets the text of the query.- Returns:
- the query text.
-
setQueryText
Sets the text of the query.- Parameters:
queryText
- the query text.- Returns:
- the SqlQuerySpec.
-
getParameters
Gets the container of query parameters.- Returns:
- the query parameters.
-
setParameters
Sets the container of query parameters.- Parameters:
parameters
- the query parameters.- Returns:
- the SqlQuerySpec.
-