Look at Dexie Cloud - David has worked this out for Postgres.
If you want to write your own, it is a LOT MORE WORK than you think. We wrote our own to work with SQL Server and C#
(it is proprietary, I can't share it) Months later, we are still finding edge cases - there are many edge cases.
If you still want to write your own, you are probably mistaken..
If records can be created client side - use GUID identifiers
If it is an existing database with integer identifiers, add a GUID identifier field.
Set aside a few months of time to work out the rest.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.