Added option to configure type of rows returned from queries.