Package com.azure.cosmos.models
Class SqlQuerySpec
- java.lang.Object
-
- com.azure.cosmos.models.SqlQuerySpec
-
public final class SqlQuerySpec extends Object
Represents a SQL query in the Azure Cosmos DB database service.
-
-
Constructor Summary
Constructors Constructor Description SqlQuerySpec()
Initializes 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<SqlParameter>
getParameters()
Gets the container of query parameters.String
getQueryText()
Gets the text of the query.SqlQuerySpec
setParameters(List<SqlParameter> parameters)
Sets the container of query parameters.SqlQuerySpec
setQueryText(String queryText)
Sets the text of the query.
-
-
-
Constructor Detail
-
SqlQuerySpec
public SqlQuerySpec()
Initializes a new instance of the SqlQuerySpec class.
-
SqlQuerySpec
public SqlQuerySpec(String queryText)
Initializes a new instance of the SqlQuerySpec class with the text of the query.- Parameters:
queryText
- the query text.
-
SqlQuerySpec
public SqlQuerySpec(String queryText, List<SqlParameter> parameters)
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
public SqlQuerySpec(String queryText, SqlParameter... parameters)
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 Detail
-
getQueryText
public String getQueryText()
Gets the text of the query.- Returns:
- the query text.
-
setQueryText
public SqlQuerySpec setQueryText(String queryText)
Sets the text of the query.- Parameters:
queryText
- the query text.- Returns:
- the SqlQuerySpec.
-
getParameters
public List<SqlParameter> getParameters()
Gets the container of query parameters.- Returns:
- the query parameters.
-
setParameters
public SqlQuerySpec setParameters(List<SqlParameter> parameters)
Sets the container of query parameters.- Parameters:
parameters
- the query parameters.- Returns:
- the SqlQuerySpec.
-
-