Changeset 138 for trunk/Packages/PersistentData/Backend
- Timestamp:
- Sep 9, 2022, 8:20:25 PM (2 years ago)
- Location:
- trunk/Packages/PersistentData/Backend
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/PersistentData/Backend/UPDClientMemory.pas
r137 r138 4 4 5 5 uses 6 Classes, SysUtils, UPDClient, SpecializedList;6 Classes, SysUtils, UPDClient, Generics.Collections; 7 7 8 8 type … … 19 19 function SearchObject(Id: Integer): TObjectProxy; 20 20 public 21 Objects: T ListObject;21 Objects: TObjectList<TObjectProxy>; 22 22 procedure ObjectLoad(AObject: TObjectProxy); override; 23 23 procedure ObjectSave(AObject: TObjectProxy); override; … … 96 96 else begin 97 97 AObject.Id := GetNewObjectId; 98 Obj := TObjectProxy(Objects.Add New(TObjectProxy.Create));98 Obj := TObjectProxy(Objects.Add(TObjectProxy.Create)); 99 99 Obj.Assign(AObject); 100 100 end; … … 118 118 NewObject: TObjectProxy; 119 119 Table: string; 120 Item: TPair<string, string>; 120 121 begin 121 122 AList.Objects.Clear; … … 131 132 132 133 if AList.ColummsFilterUse then begin 133 for P := 0 to Properties.Count - 1do134 if AList.ColumnsFilter.IndexOf( Properties.Keys[I]) <> -1 then135 NewObject.Properties.Add( Properties.Keys[I], Properties[I].Value);134 for Item in Properties do 135 if AList.ColumnsFilter.IndexOf(Item.Key) <> -1 then 136 NewObject.Properties.Add(Item.Key, Item.Value); 136 137 end else NewObject.Properties.Assign(Properties); 137 138 end; … … 172 173 begin 173 174 inherited; 174 Objects := T ListObject.Create;175 Objects := TObjectList<TObjectProxy>.Create; 175 176 BackendName := 'Memory'; 176 177 end; -
trunk/Packages/PersistentData/Backend/UPDClientMySQL.pas
r137 r138 4 4 5 5 uses 6 Classes, SysUtils, USqlDatabase, UPDClient, SpecializedDictionary;6 Classes, SysUtils, USqlDatabase, UPDClient, UGenerics; 7 7 8 8 type
Note:
See TracChangeset
for help on using the changeset viewer.