SQL gem with reflection