Skip to content

Toro Cloud Dev Center


SqlFunctions

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

Below are examples on how to use some of this class's functions:

Sample service showing how to use the `Sql` functions

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