WIP, using Ruby to transmogrify SQL output to API friendly format.