T - Type of itemspublic final class ColumnOutcome<T> extends Object implements Outcome<Collection<T>>
Use it when you need the first column:
Collection&lgt;Long> salaries = new JdbcSession(source)
.sql("SELECT salary FROM user")
.select(new ColumnOutcome<Long>(Long.class));
Supported types are: String, Long, Boolean,
Byte, Date, and Utc.
LAST_INSERT_ID, NOT_EMPTY, UPDATE_COUNT, VOID| Constructor and Description |
|---|
ColumnOutcome(Class<T> tpe)
Public ctor.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<T> |
handle(ResultSet rset,
Statement stmt)
Process the result set and return some value.
|
public Collection<T> handle(ResultSet rset, Statement stmt) throws SQLException
Outcomehandle in interface Outcome<Collection<T>>rset - The result set to processstmt - The statement used in the runSQLException - If something goes wrong insideCopyright © 2012–2019 jcabi.com. All rights reserved.