A first pass at SQL value boxing; more testing needed.