Skip to content

Overview

Development

Overview

IDEs

API Explorer

SqlMethods

SqlMethods contains one-liners for SQL-related operations such as creating a connection to a database, executing SQL queries, and starting, rolling back, and committing transactions. Methods in this class are for use in both Gloop and Groovy.

Below are examples on how to use some of this class's one-liners:

Sample Gloop service showing how to use the `SqlMethods` one-liners

1
2
3
4
// Execute a select statement and print entries to the console
connectionPoolName.sql().query('SELECT * from TABLE') {
    ResultSet rs -> while (rs.next()) println rs.getString('COLUMN')
}