Initializer
Select(String sql)
Attributes
limitSource Codeshared variable Integer? limit

An optional limit to the number of rows to return.

Inherited Attributes
Attributes inherited from: Object
Methods
executeSource Codeshared Row[] execute(Object* arguments)

Execute this query with the given arguments to its parameters, returning a sequence of Rows.

forEachRowSource Codeshared void forEachRow(Object* arguments)(void do(Row row))

Execute this query with the given arguments to its parameters, and for each resulting Row, call the given function.

singleValueSource Codeshared Value singleValue<Value>(Object* arguments)

Execute this query with the given arguments to its parameters, returning a single value. The query result must be single row/single column containing a value assignable to the given type.

value count = sql.Select("select count(*) from table")
        .singleValue<Integer>();
Inherited Methods
Methods inherited from: Object
Nested Classes
ResultsSource Codeshared Results

Execute this query with the given Results.arguments to its parameters. The resulting instance of Results may be iterated, producing Rows lazily.

Should be instantiated using try:

try (results = sql.Select("select * from table").Results()) {
    for (row in results) {
        //read the row here
    }
}