Added method database to allow transformation of query results as they are being stepped through.