Reputation: 1554
I have a table controller, which has one way sync (Only get since there is no any update from mobile). So the very first time when I do the PullAsync it has pulled whole data since my Update At filed has the same timestamp for all the records. Now Second time I just wanted to do the incremental Pull (Note I do pass a name value to PullAsync to enable incremental sync).
But the problem is, it retrieves whole data again since there is no updated time stamp in Updated At (Because there is no update method in the Table Controller since it is one-way sync-Azure to mobile). How can I omit pulling data again if there is no update while all the Update At values are same time stamp? The issue is same as mentioned in below link. Do we still need to do one record update in order to fix this?
Thanks in Advance
Upvotes: 0
Views: 462
Reputation: 18465
How can I omit pulling data again if there is no update while all the Update At values are same time stamp? The issue is same as mentioned in below link. Do we still need to do one record update in order to fix this?
I have checked that this issue still exists. AFAIK, the PullAsync
operation would pull 50 records (MaxPageSize by default is 50), then begin a transaction to insert / update the retrieved entities, then update the local __config
table with the latest updatedAt timestamp, then try to retrieve next page records and execute the above processing again.
Note: The format of id
column looks like this deltaToken|{table-name}|{query-id}
.
The pull operation request would look like:
https://<app-name>.azurewebsites.net/tables/<table-name>?$filter=(updatedAt ge datetimeoffset'2018-02-21T08:58:45.446Z')&$orderby=updatedAt&$skip=0&$top=50&__includeDeleted=true
I assume that you could query the local __config
table to retrieve the latest updatedAt value or query the related local table to retrieve the latest updatedAt value, then add a small time interval to the current updatedAt and explicitly specify the filter on UpdatedAt
property with the previous updatedAt when using the incremental pull operation.
Upvotes: 1