O'Reilly logo

Groovy Programming by John Savage, Kenneth Barclay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 17 PERSISTENCE

In this chapter, we are concerned with persisting our data in a relational database (we assume a familiarity with the Structured Query Language (SQL) (Beaulieu, 2005; Molinaro, 2006). For the Java developer, this would involve programming to the Java Database Connectivity (JDBC) API. While ultimately, so too does the Groovy programmer, much of the burden of developing with this API is shifted to the Groovy framework, which makes light of the work involved in manipulating sets of data extracted from a database. For example, iterators and closures allow us to easily traverse the rows of a database table.

17.1 SIMPLE QUERIES

Consider a database with a single table having the details of a number of bank accounts. The table, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required