added affectedRows member to database wrapper