Feature request detect dataset changes

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
DPStano
Junior Boarder
Junior Boarder
Posts: 39
Joined: 16.05.2016, 09:21

Feature request detect dataset changes

Post by DPStano »

imagine that you make query like 'SELECT author from authors where author = 'Foo''; // Modified and PendingUpdates is False

now call dataset.fieldbyName('author').asString = 'Foo' // Modified and PendingUpdates is True now

and when you call dataset.Post-> it will produce no query, it would be nice to be able detect changes that will produce queries something like

Code: Select all

IZCachedResultSet -> HasPhysicalChanges 

function TZAbstractCachedResultSet.HasPhysicalChanges():boolean
begin
 // will compare detect changes based on OldRowAccessor, NewRowAccessor comparation 
end

function TZAbstractDataset.HasPhysicalUpdates: Boolean;
begin
  if State = dsInactive then
    Result := False
  else if (CachedResultSet <> nil) and CachedResultSet.HasPhysicalChanges then
    Result := True
  else if (State in [dsInsert, dsEdit]) then
    Result := Modified
  else
    Result := False;
end;
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Feature request detect dataset changes

Post by marsupilami »

Hello - the problem here is that Zeos (currently) doesn't use its own set of TFields. So we are limited to the things that Delphi enables us to do.
Post Reply