database

Database connectivity and operations in Groovy.

Groovy DataSet – 12 Tested Examples for Type-Safe Database Queries

Groovy DataSet for type-safe database queries. 12 examples covering findAll, sort, add, chaining, generated SQL.x with H2. “The best database code is the code that doesn’t look like SQL at all. Groovy’s DataSet lets you query databases with closures instead of strings.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Intermediate | Reading Time: 25 minutes What Is Groovy DataSet? If you have been writing raw SQL strings with groovy.sql.Sql, you know how easy it ... Read More

Groovy SQL Batch Processing – withBatch Performance Guide with 12 Examples

Groovy SQL batch processing with withBatch for high-performance bulk inserts. 12+ examples covering batch size tuning, performance benchmarks, large dataset handling, and combining batches with transactions. “A database without transactions is like a bank without locks – everything works fine until two people reach for the same cash at the same time.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Intermediate to Advanced | Reading Time: 25 minutes Inserting one row at a time into ... Read More

Groovy SQL Stored Procedures and Functions with 10+ Examples

how to use Groovy stored procedure calls and functions from Groovy with 10+ examples. Cover input/output parameters, result sets, and database-specific syntax. “Push logic down to the database when performance demands it.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Intermediate to Advanced | Reading Time: 17 minutes Calling a groovy stored procedure through the groovy.sql.Sql class is simple – you get call(), eachRow(), and direct CallableStatement access for output parameters. Stored procedures encapsulate business ... Read More