Skip to content

Home

Introduction

Development

IDEs

Services

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

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
"connectionName".sql().query('SELECT * from TABLE') {
    ResultSet rs -> while (rs.next()) println rs.getString('COLUMN')
}