public class SQLResultsSheet extends AbstractFilter<Object,Object> implements ArooaSessionAware
<oddjob> <job> <sql> <connection> <connection driver="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:mem:SQLResultsSheet_Example" username="sa" password=""/> </connection> <input> <buffer> create table FRUIT( TYPE varchar(16), VARIETY varchar(16), COLOUR varchar(32), SIZE double); insert into FRUIT values ('Apple', 'Cox', 'Red and Green', 7.6); insert into FRUIT values ('Orange', 'Jaffa', 'Orange', 9.245); select * from FRUIT; shutdown; </buffer> </input> <results> <sql-results-sheet/> </results> </sql> </job> </oddjob>This writes the following to the console:
[0 rows affected, 16 ms.]
[1 rows affected, 0 ms.]
[1 rows affected, 0 ms.]
TYPE VARIETY COLOUR SIZE
------ ------- ------------- -----
Apple Cox Red and Green 7.6
Orange Jaffa Orange 9.245
[2 rows, 212 ms.]
[0 rows affected, 0 ms.]
Constructor and Description |
---|
SQLResultsSheet() |
Modifier and Type | Method and Description |
---|---|
protected Object |
filter(Object from) |
OutputStream |
getOutput() |
boolean |
isDataOnly() |
void |
setArooaSession(ArooaSession session) |
void |
setBusConductor(BusConductor busConductor) |
void |
setDataOnly(boolean dataOnly) |
void |
setOutput(OutputStream output) |
void |
writeBeans(List<Object> beans) |
add, getName, getTo, setName, setTo, toString
addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
public void setArooaSession(ArooaSession session)
setArooaSession
in interface ArooaSessionAware
protected Object filter(Object from)
filter
in class AbstractFilter<Object,Object>
public OutputStream getOutput()
public void setOutput(OutputStream output)
public boolean isDataOnly()
public void setDataOnly(boolean dataOnly)
@Inject public void setBusConductor(BusConductor busConductor)