类别 | 说明 |
TFDJSONDeltas | 包含异动的delta的类别。客户端存放deltade对象 |
TFDJSONDeltasWriter | 把deltas写入TFDJSONDeltas |
TFDJSONDeltasApplyUpdates | update数据到DB |
TFDJSONDeltasWriter.ListAdd()写入TFDJSONDeltas。参数是[name : delta]格式。
function TServerMethods1.post(const ADeltaList:TFDJSONDeltas):Integer; var LApply : TFDJSONDeltasApplyUpdates; begin LApply := TFDJSONDeltasApplyUpdates.create(ADeltaList); Result := LApply.applyUpdates('name1',fdquery1.command);//name1是TFDJSONDeltasWriter.ListAdd()写入TFDJSONDeltas。参数是[name : delta]格式。 if Lapply.errors.Count > 0 then raise Exception.Create(:apply.Errors.String.Text); end;
=========================
IFDJSONDeltasApplyUpdates = interface(IFDJSONDeltasReader)
[‘{xxxxxxxxx-xxxxx-xxx-xxxx-xxxxxxxxxxxxx}’]
function AppluUpdates(const AKey: string; const ASelectCommand: TFDCustomCommand):Integer;overload;
function AppluUpdates(const Index: Integer; const ASelectCommand: TFDCustomCommand):Integer;overload;
......
......
end;