combine the overloads for retrieve_rows_sql and retrieve_rows methods to permit both limitations to be combined