code: public static void withInstance(String url, Closure c) throws SQLException {
          Sql sql = null;
          try {
              sql = newInstance(url);
              c.call(sql);
          } finally {
              if (sql != null) sql.close();
          }
      }
docs: Invokes a closure passing it a new Sql instance created from the given JDBC connection URL.
  The created connection will be closed if required.
  
  @param url a database url of the form
  <code>jdbc:<em>subprotocol</em>:<em>subname</em></code>
  @param c the Closure to call
  @see #newInstance(String)
  @throws SQLException if a database access error occurs