LoopbackTransaction::RenumberForeignKey (open)
Renumbers all references (foreign keys) pointing to a specific id
Syntax
LOADLIB "wh::dbase/loopback.whlib";
RECORD FUNCTION RenumberForeignKey(STRING schemaname, STRING tablename, INTEGER renumberfrom, INTEGER renumberto, RECORD options)
Parameters
STRING schemaname
Schema containing the table
STRING tablename
Table containing the database row which we're renumbering
INTEGER renumberfrom
Current id
INTEGER renumberto
ID to renumber to
RECORD options
Options
exceptions
List of columns to skip
exceptions.columnname
Name of the column to skip
exceptions.schemaname
Schema of the table with the column to skip
exceptions.tablename
Table with the column to skip
BOOLEAN reportmodifiedrows
List of tables to report modifications on
reportmodifiedrows.columns
List of the columns to give back for modified rows
reportmodifiedrows.schemaname
Schema of the table to report modifications on
reportmodifiedrows.tablename
Table to report modifications on
Return value
RECORD
Renumbering results
modifications
List of modified rows
modifications.columnname
Modified column
modifications.rows
Modified rows
modifications.schemaname
Schema of table with modified column
modifications.tablename
Table with the modified column