dbsync_app.new_temp_autoincr()
Get a new local temp auto-incremented identifier.
Syntax
FUNCTION new_temp_autoincr(
tabname STRING,
)
RETURNS BIGINT
- tabname is the name of the table.
Returns:
- The new temp id.
Usage
The function generates a new unique negative integer for the given table, defined with an auto-incremented column, to INSERT a new row in the local database. To avoid re-generation of the same value between two sync procedures, we query the dbsync log table which holds the history of changes since last sync process.
The current schema must have been loaded with register_local_dbschema()
.