Class SqlQuerySpec


  • public final class SqlQuerySpec
    extends JsonSerializable
    Represents a SQL query in the Azure Cosmos DB database service.
    • 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.