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;