dbsync_app.collect_local_changes()

Collect local changes.

Syntax

FUNCTION collect_local_changes() RETURNS INTEGER
Returns:
  1. The status.

Usage

Use this function in DB Sync client app code to build the list of changes to be sent to the server by the sync procedure.

The function collects changes registered in the dbsync log with the register_local_*() functions, saving current row data into the stash table corresponding to the application table. The row data is collected from the stash tables, because the real app tables have no history of the changes done since the last sync.

The current schema must have been loaded with register_local_dbschema().

The list of tables must have been registered with register_local_tables().

The records found in the dbsync log table must match the tabinfo list.