Move more sql construction responsibilities into the DV handlers