Feature request detect dataset changes
Posted: 20.07.2016, 12:46
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
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;