Skip to main content

DisconnectAndClearOptions

Options passed to CommonPowerSyncDatabase#disconnectAndClear.

Properties​

PropertyTypeDescription
clearLocal?booleanWhen set to false, data in local-only tables is preserved.
soft?booleanA [soft] clear deletes publicly visible tables, but keeps internal copies of data synced in the database. This usually means that if CommonPowerSyncDatabase#connect is later called again with a JWT from the same user, the first sync is very fast because all internal data is still available. When a different user logs in, no old data would be visible at any point. Using soft deletes is recommended where it's not a security issue that old data could be reconstructed from internal database tables.