removing viewraid sql by reference to Raid class