Move transaction sql to the Connection object