zumero

Zumero sync: knowing what tables are changed


I have this kind of situation. A mobile app designed for technicians has a background task that perform data syncinc often (it's planned about each 10 minutes), and for most of the data in the DB there's no problems of doing it so often, as they doesn't change so often. But I have also a PARAMETERS table that I need to know when changes, because it involves some time-consuming operations on the mobile device, and I'd like to do it only when something changes, or postpone them. Is it possible to achieve it with Zumero ? Thanks. Rodolfo.


Solution

  • It's undocumented (so, not guaranteed to be future proof), but you can check the following before and after sync:

    select max(z_rv) from PARAMETERS;
    select count(*) from PARAMETERS;
    

    If updates or inserts have occurred, z_rv will increase. A change in count() will catch deletes.