[ rubbish-db ]

ソース

RubbishDatabase dbh = new RubbishDatabase();
dbh.setLogging(true);

dbh.connect("jdbc:hsqldb:hsql://localhost", "sa", "");

Integer count = (Integer) dbh.getOne("SELECT COUNT(*) FROM BOOK WHERE PUBLISHER=?", "06");
println("count=" + count);

dbh.disconnect();

結果

connect database 'url=jdbc:hsqldb:hsql://localhost, user=sa, password='.
'SELECT COUNT(*) FROM BOOK WHERE PUBLISHER=? [06]'
count=76
disconnect database.