PostgreSQL, UniQuery, FetchAll questions
Posted: Mon 12 Nov 2018 22:37
Hello,
Describe please, how to proper use FetchAll option.
I have a big table (more then 2M complex records) and I want to scan it and use some information to insert or update other table.
Example:
UQ:=TUniQuery.Create(nil);
UQ.Connection:=DM_01.UniConnection1;
UQ.Options.DefaultValues:=true;
UQ.UniDirectional := true;
UQ.FetchRows := 10000;
UQ.SpecificOptions.Values['FetchAll'] := 'False';
UQ.SQL.Add('SELECT * FROM big_table;');
UQ.Open;
if UQ.RecordCount>0 then begin
....
end;
UQ.Close;
UQ.Free;
1. The first of all is the scope of FetchAll option. Is this value assigned only for the current query or to the entire connection ?
2. The UniDirectional property scope is only for the current query or to the entire connection??
Regards
Michal
Describe please, how to proper use FetchAll option.
I have a big table (more then 2M complex records) and I want to scan it and use some information to insert or update other table.
Example:
UQ:=TUniQuery.Create(nil);
UQ.Connection:=DM_01.UniConnection1;
UQ.Options.DefaultValues:=true;
UQ.UniDirectional := true;
UQ.FetchRows := 10000;
UQ.SpecificOptions.Values['FetchAll'] := 'False';
UQ.SQL.Add('SELECT * FROM big_table;');
UQ.Open;
if UQ.RecordCount>0 then begin
....
end;
UQ.Close;
UQ.Free;
1. The first of all is the scope of FetchAll option. Is this value assigned only for the current query or to the entire connection ?
2. The UniDirectional property scope is only for the current query or to the entire connection??
Regards
Michal