Package groovy.sql

# Class SqlWithParams

java.lang.Object
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
  Description
  `SqlWithParams(String sql, List<?> params)`
  Creates an SQL-and-parameters pair.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<Object>`
  `getParams()`
  Returns the positional parameters.
  `String`
  `getSql()`
  Returns the SQL text.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SqlWithParams

    public SqlWithParams(String sql, List<?> params)
    Creates an SQL-and-parameters pair.
    Parameters:
      `sql` - the SQL text
      `params` - the corresponding positional parameters

- ## Method Details

  - ### getSql

    public String getSql()
    Returns the SQL text.
    Returns:
      the SQL text

  - ### getParams

    public List<Object> getParams()
    Returns the positional parameters.
    Returns:
      the positional parameters