title: FDQuery (SQL) results to array of records in Delphi
body: <p>Is there a way to copy FDQuery results to array of records directly?
  So this is declared types:</p>
  
  <pre><code>type
    TPerson = record
      id: integer;
      name: string;
      surname: string;
    end;
  
  type
    TPersonList = array of TPerson;
  </code></pre>
  
  <p>and I have SQLite DB with columns <code>id, name</code>and<code>surname</code>.
  Normally I should add values to that array like this:</p>
  
  <pre><code>var Persons: TPersonList;
  begin
  Persons[0].id := FDQuery1.FieldByName('id').AsInteger;
  ....
  ....
  ....
  end;
  </code></pre>
  
  <p>but is there any better/compact way to do this? 
  Some function like:</p>
  
  <pre><code>while not FDQuery.eof do begin
      ...
      Persons[i] := FDQuery1[i];
      ...
  end;
  </code></pre>
  
  <p>Maybe directly or in the loop? 
  Or should i create some function to do that? 
  As I have many columns, and many different record types with different structure but with exact structure like in db.</p>