- for
get,update,search,bulk: All items are now stored in thelocal_db, with the following logic:
if item.id not in local_db:
local_db.add(item)
else:
local_item = local_db[item.id]
merge(local_item, item, merge_priority)
- add
requires_client_refto ItemBase to keep compatible withDataset -
ItemBasehas anensure_idmethod, that creates a new ID if the item doesnt have one. -
ItemBasenow has an_in_podproperty, which tracks if the item already exists in pod. -
ItemBasenow tracks which properties are updated by keeping a record oforiginal_propertiesanddate_local_modified. Each changed property gets recorded in both, which enableslocal,remoteandnewestmerge strategies -
ItemBasenow has anon_sync()method, which resets these tracking variables to the appropriate values after syncing.