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

    • 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.