updated_at
field in a table is a good candidate for cursor, or
id
if it is auto-incrementing.
Cursors are defined in model
updated_at
. The model will only fetch rows where update_at
value is greater than the last cursor
value, which is stored in the sync state and
referenced by :cursor
in the query.
null
. It means that all rows will be fetched.
So the query should be able to handle null
cursor value properly, note the :cursor is null
part in the query.