Package: groovy.sql

## [Java] Class SqlWithParams

- groovy.sql.SqlWithParams

-     public class SqlWithParams
      extends Object

  Holds an SQL string together with the positional parameters that should be bound to it.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `SqlWithParams(String sql, List<?> params)` Creates an SQL-and-parameters pair.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public List<Object>` | `getParams()` Returns the positional parameters.
    `` | `public String` | `getSql()` Returns the SQL text.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public SqlWithParams(String sql, List<?> params)

      Creates an SQL-and-parameters pair.

      Parameters:
        `sql` - the SQL text
        `params` - the corresponding positional parameters

  - ### Method Detail

    - #### public List<Object> getParams()

      Returns the positional parameters.

      Returns:
        the positional parameters

    - #### public String getSql()

      Returns the SQL text.

      Returns:
        the SQL text