code: private List iterateAndReturnNative(final ResultSet rSet) {
          final Iterator<Row> rowIter = rSet.iterator();
          final List results = new ArrayList();
          final List item = new ArrayList<>();
  
          final boolean isSingle = (rSet.getColumnDefinitions().size() == 1);
  
          while (rowIter.hasNext()) {
              final Row row = rowIter.next();
  
              final ColumnDefinitions columnDefs = row.getColumnDefinitions();
  
              final Iterator<Definition> columnDefIter = columnDefs.iterator();
  
              item.clear();
  
              while (columnDefIter.hasNext()) {
                  final Definition columnDef = columnDefIter.next();
  
                  item.add(DSClientUtilities.assign(row, null, null, columnDef.getType().getName(), null,
                      columnDef.getName(), null, null));
              }
  
              if (isSingle) {
                  if (!item.isEmpty())
                      results.add(item.get(0));
                  else
                      results.add(null);
              } else
                  results.add(item.toArray(new Object[item.size()]));
          }
  
          return results;
      }
docs: XXX
  
  Iterate and return for native queries. Returns a List&lt;Object&gt; or a List&lt;Object[]&gt;
  
  @param rSet
  the r set
  @return the list