Return a hashmap of the query result for Ruby Helper.