database

Database connectivity and operations in Groovy.

Groovy SQL Update and Delete – 13 Tested Examples with H2

Groovy SQL update and delete operations with 13+ examples. Covers executeUpdate, parameterized queries, batch updates, and soft deletes. Tested on Groovy 5.x. “The ability to destroy data is just as important as the ability to create it. The trick is knowing which rows to touch.” C.J. Date, Database Relational Model Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Intermediate | Reading Time: 25 minutes So you’ve connected to a database and you know how to ... Read More

Groovy SQL – Connect and Query Databases with 10+ Examples

Groovy SQL with 10+ examples. Connect to H2, MySQL, PostgreSQL using groovy.sql.Sql, run queries with eachRow, rows(), firstRow(). “The best tool for managing data is a well-written query.” C.J. Date, Database Relational Model Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Intermediate | Reading Time: 18 minutes If you have ever used JDBC in Java, you know how painful it can be. Open a connection, create a statement, execute a query, iterate through a ResultSet, ... Read More