helper function for scanning without knowing about the data given

This adds some functionality that I use to retrieve arbitrary data from a query, without knowing the "shape" or type of the data before I query.