// Get a connection to the db.
db = TurbineDB.getConnection(dbName);
Connection connection = db.getConnection();
// Execute the query.
qds = new QueryDataSet( connection, query );
// Continue getting rows until the memory limit is
// reached, all results have been retrieved, or the rest
// of the results have been determined to be irrelevant.
while( !killThread &&