Move more sql construction responsibilities into the DV handlers

That was under the assumption we did not need the equality field. We still do for the optimized updates no?