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