共用方式為


SqlQuerySpec Class

  • java.lang.Object
    • com.azure.cosmos.models.SqlQuerySpec

public final class SqlQuerySpec

Represents a SQL query in the Azure Cosmos DB database service.

Constructor Summary

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

Modifier and Type Method and 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.

Methods inherited from java.lang.Object

Constructor Details

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, 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, List 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 Details

getParameters

public List getParameters()

Gets the container of query parameters.

Returns:

the query parameters.

getQueryText

public String getQueryText()

Gets the text of the query.

Returns:

the query text.

setParameters

public SqlQuerySpec setParameters(List parameters)

Sets the container of query parameters.

Parameters:

parameters - the query parameters.

Returns:

the SqlQuerySpec.

setQueryText

public SqlQuerySpec setQueryText(String queryText)

Sets the text of the query.

Parameters:

queryText - the query text.

Returns:

the SqlQuerySpec.

Applies to