Hello!!
I have a billing application that works 100% offline and I need to synchronize it with a mysql server, I have searched for information and I see "SyncedDB", which I recommend?
Thanks in advance
Dexie has CRUD hooks that can be used to implement synchronization.
One implementation of a sync framework for Dexie is Dexie.Syncable.js but you will need to have similar replication capabilities at your mySQL DB. In many cases the server will have to sync partial content based on the user or active tenant.
You can check out the samples at samples/remote-sync. But you will need to implement the server part and the binding to MySQL. I personally have implemented a server-en for SqlServer with multi-tenant support that only syncs the entities that the authenticated user will have access to. To accomplish that, I needed a replication table with a tenant-id column so that I could get all changes that affects the tenants that the user is member of.
One question, how can I make the table name dynamic? I have tried db.table ( "table-name"). Get (id) ...
Ex.
Var tableName="customers"
db.table(tableName).get()...
Thank you very much
Yes, db.table(tableName) retrieves the table for you and is equivalent to db[tableName].
Yes, but I need db.table(tableNameString).get(id) OR db.table(tableNameString).add(obj) ,.... for example, is possible???
Most helpful comment
Dexie has CRUD hooks that can be used to implement synchronization.
One implementation of a sync framework for Dexie is Dexie.Syncable.js but you will need to have similar replication capabilities at your mySQL DB. In many cases the server will have to sync partial content based on the user or active tenant.
You can check out the samples at samples/remote-sync. But you will need to implement the server part and the binding to MySQL. I personally have implemented a server-en for SqlServer with multi-tenant support that only syncs the entities that the authenticated user will have access to. To accomplish that, I needed a replication table with a tenant-id column so that I could get all changes that affects the tenants that the user is member of.