Package com.azure.data.cosmos
Class SqlQuerySpec
- java.lang.Object
-
- com.azure.data.cosmos.JsonSerializable
-
- com.azure.data.cosmos.SqlQuerySpec
-
public final class SqlQuerySpec extends JsonSerializable
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, SqlParameterList 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 SqlParameterList
parameters()
Gets the collection of query parameters.SqlQuerySpec
parameters(SqlParameterList parameters)
Sets the collection of query parameters.String
queryText()
Gets the text of the query.SqlQuerySpec
queryText(String queryText)
Sets the text of the query.-
Methods inherited from class com.azure.data.cosmos.JsonSerializable
get, getBoolean, getCollection, getDouble, getInt, getList, getLogger, getLong, getMap, getObject, getObjectByPath, getString, has, toJson, toJson, toObject, toString
-
-
-
-
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, SqlParameterList 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
-
queryText
public String queryText()
Gets the text of the query.- Returns:
- the query text.
-
queryText
public SqlQuerySpec queryText(String queryText)
Sets the text of the query.- Parameters:
queryText
- the query text.- Returns:
- the SqlQuerySpec.
-
parameters
public SqlParameterList parameters()
Gets the collection of query parameters.- Returns:
- the query parameters.
-
parameters
public SqlQuerySpec parameters(SqlParameterList parameters)
Sets the collection of query parameters.- Parameters:
parameters
- the query parameters.- Returns:
- the SqlQuerySpec.
-
-