Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

SqlMethods

SqlMethods contains one-liners for SQL-related operations such as creating a connection to a database. To view to the javadocs go here.

These are the different ways of using SqlMethods:

Using Gloovy Step sql method gloovy step

Using Invoke Code Step sql method invoke step

Using Gloovy Step coder sql method gloovy step

Using Invoke Code Step coder sql method invoke step

1
2
3
4
5
6
7
8
9
    public Sql getSqlConnection( String connectionPoolName ) {
        return connectionPoolName.sql();
    }

    public void doSelect( String connectionPoolName ) {
        getSqlConnection(connectionPoolName).query("select * from TABLE",  {
            ResultSet rs ->  while ( rs.next() ) println rs.getString('column')
        }) //do a select statement and prints the result
    }