Add callbacks

I've changed the emitters to callbacks so as to allow for more flexible handling of SQL query results.  I've also updated the tests ... BUT my Oracle SQL database uses different syntax so while it "should" work for your sql database (hsqlpd) it might need some tweaking, sorry (I kept the test code using the hsqlpd connection)!