This is a DRAFT PAGE for an unreleased version of Groovy and is incomplete and subject to change

Groovy 1.8.1 release notes

The 1.8.1 release of Groovy is primarily a bug fix release but also comes with the new features outlined below.

Support for begin() / end() methods when processing files line by line with the groovy command

A feature found in other scripting languages like Perl or Awk is to be able to have a begin / end method when processing a file line by line. The groovy command supports this mode of operation, but didn't support the begin / end methods. (this feature is actually going to be available in 1.7.11 and 1.8.1, but time ran short for inclusion in the 1.8 final release)

More concretely, if you have a text file named dummy.txt, and you want to count the number of lines it contains, you could do this on the command-line:

Sql batch support that allows PreparedStatements to be used as shown in these examples:

Shown for a batch size of 20:

Named parameters (into maps or domain objects) are also supported:

Named ordinal parameters (into maps or domain objects) are also supported: